diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-06-14 21:23:43 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-06-14 21:23:43 +0000 |
commit | 8479f9f7d3fac833da9357b87a53bfedbc2df055 (patch) | |
tree | 8a52ed98cb781115ecdee2aeda1cb23152b00977 | |
parent | ea381a6ad143e77e1ae3cad70f84fd8d9a1e86e6 (diff) | |
download | build-8479f9f7d3fac833da9357b87a53bfedbc2df055.tar.gz build-8479f9f7d3fac833da9357b87a53bfedbc2df055.tar.bz2 build-8479f9f7d3fac833da9357b87a53bfedbc2df055.tar.xz build-8479f9f7d3fac833da9357b87a53bfedbc2df055.zip |
Fix to the file lib code to cast opaque values to ints in a more cross-platform
manor.
Diffstat (limited to '')
-rw-r--r-- | src/functionclose.cpp | 2 | ||||
-rw-r--r-- | src/functionread.cpp | 2 | ||||
-rw-r--r-- | src/functionwrite.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/functionclose.cpp b/src/functionclose.cpp index ac9c6f6..d652913 100644 --- a/src/functionclose.cpp +++ b/src/functionclose.cpp | |||
@@ -20,7 +20,7 @@ Bu::String FunctionClose::getName() const | |||
20 | 20 | ||
21 | Variable FunctionClose::call( Variable &input, VarList ) | 21 | Variable FunctionClose::call( Variable &input, VarList ) |
22 | { | 22 | { |
23 | FileMgr::getInstance().close( (int)input.getOpaque() ); | 23 | FileMgr::getInstance().close( (ptrdiff_t)input.getOpaque() ); |
24 | return Variable(); | 24 | return Variable(); |
25 | } | 25 | } |
26 | 26 | ||
diff --git a/src/functionread.cpp b/src/functionread.cpp index 789e9e1..b9c8397 100644 --- a/src/functionread.cpp +++ b/src/functionread.cpp | |||
@@ -26,7 +26,7 @@ Variable FunctionRead::call( Variable &input, VarList lParams ) | |||
26 | int iSize = lParams.first().toInt(); | 26 | int iSize = lParams.first().toInt(); |
27 | Bu::String sBuf( iSize ); | 27 | Bu::String sBuf( iSize ); |
28 | sBuf.resize( | 28 | sBuf.resize( |
29 | FileMgr::getInstance().get( (int)input.getOpaque() ).read( | 29 | FileMgr::getInstance().get( (ptrdiff_t)input.getOpaque() ).read( |
30 | sBuf.getStr(), iSize | 30 | sBuf.getStr(), iSize |
31 | ) | 31 | ) |
32 | ); | 32 | ); |
diff --git a/src/functionwrite.cpp b/src/functionwrite.cpp index 7abb661..14a396a 100644 --- a/src/functionwrite.cpp +++ b/src/functionwrite.cpp | |||
@@ -26,7 +26,7 @@ Variable FunctionWrite::call( Variable &input, VarList lParams ) | |||
26 | "write takes one parameter, the string to write." | 26 | "write takes one parameter, the string to write." |
27 | ); | 27 | ); |
28 | } | 28 | } |
29 | FileMgr::getInstance().get( (int)input.getOpaque() ).write( | 29 | FileMgr::getInstance().get( (ptrdiff_t)input.getOpaque() ).write( |
30 | lParams.first().toString() | 30 | lParams.first().toString() |
31 | ); | 31 | ); |
32 | return Variable(); | 32 | return Variable(); |