summaryrefslogtreecommitdiff
path: root/Lib/scilab
diff options
context:
space:
mode:
authorSimon Marchetto <simon.marchetto@scilab-enterprises.com>2015-02-13 12:07:27 +0100
committerSimon Marchetto <simon.marchetto@scilab-enterprises.com>2015-02-13 12:07:27 +0100
commit4b2ccd2892b63b63e3ed1f3dda82f851f29bc41d (patch)
treed04f280c76474f1680d90fcdbea4929c3e05c5c1 /Lib/scilab
parentec4b711d703b7f0854fe9bc418a33cff6ae8db78 (diff)
downloadswig-4b2ccd2892b63b63e3ed1f3dda82f851f29bc41d.tar.gz
scilab: fix compilation error on Windows
Diffstat (limited to 'Lib/scilab')
-rw-r--r--Lib/scilab/scirun.swg7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/scilab/scirun.swg b/Lib/scilab/scirun.swg
index 1910facf2..081012fe9 100644
--- a/Lib/scilab/scirun.swg
+++ b/Lib/scilab/scirun.swg
@@ -268,6 +268,7 @@ SWIG_Scilab_Raise(const int obj, const char *type, swig_type_info *descriptor) {
* Pointer utility functions
*/
+#include <stdint.h>
#ifdef __cplusplus
extern "C"
@@ -278,7 +279,7 @@ int SWIG_this(SWIG_GatewayParameters) {
SWIG_Scilab_SetOutputPosition(1);
return SWIG_Scilab_SetOutput(pvApiCtx,
createScalarDouble(pvApiCtx, SWIG_NbInputArgument(pvApiCtx) + 1,
- (double) (unsigned long) ptrValue));
+ (double)(uintptr_t)ptrValue));
}
else {
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The value is not a pointer.\n"), fname, 1);
@@ -298,7 +299,7 @@ int SWIG_ptr(SWIG_GatewayParameters) {
return SWIG_ERROR;
}
if (getScalarDouble(pvApiCtx, piAddr, &dValue) == 0) {
- if (dValue != (unsigned long)dValue) {
+ if (dValue != (uintptr_t)dValue) {
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a pointer.\n"), fname, 1);
return SWIG_ValueError;
}
@@ -308,7 +309,7 @@ int SWIG_ptr(SWIG_GatewayParameters) {
}
SWIG_Scilab_SetOutputPosition(1);
return SWIG_Scilab_SetOutput(pvApiCtx,
- SwigScilabPtrFromObject(pvApiCtx, 1, (void *) (unsigned long) dValue, NULL, 0));
+ SwigScilabPtrFromObject(pvApiCtx, 1, (void *) (uintptr_t)dValue, NULL, 0));
}
else {
return SWIG_ERROR;