summaryrefslogtreecommitdiff
path: root/src/cvc4.i
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2017-10-25 19:50:08 -0700
committerGitHub <noreply@github.com>2017-10-25 19:50:08 -0700
commit668f31897cf90544d089f53f0f4499b828d7f84b (patch)
treef6418e58df5d9512adb11043f853fdea1398be82 /src/cvc4.i
parent13c8e4a7b8575142ce9b70747969b71039389dfa (diff)
Use uintptr_t for pointer casts in Swig files (#1278)
CVC4's Swig interface files were casting pointers to longs in multiple instances. The problem with that is that on certain platforms *cough* Windows/MinGW *cough* long is only 32-bit even when compiling a 64-bit executable (they use the LLP64 data model). This made the compilation of language bindings fail with MinGW. This commit changes the types to uintptr_t defined in Swig's stdint.i.
Diffstat (limited to 'src/cvc4.i')
-rw-r--r--src/cvc4.i4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cvc4.i b/src/cvc4.i
index f07f9fba3..e1138649c 100644
--- a/src/cvc4.i
+++ b/src/cvc4.i
@@ -125,7 +125,7 @@ std::set<JavaInputStreamAdapter*> CVC4::JavaInputStreamAdapter::s_adapters;
assert(clazz != NULL && jenv->ExceptionOccurred() == NULL);
jmethodID method = jenv->GetMethodID(clazz, "<init>", "(JZ)V");
assert(method != NULL && jenv->ExceptionOccurred() == NULL);
- jthrowable t = static_cast<jthrowable>(jenv->NewObject(clazz, method, reinterpret_cast<long>(new $1_type($1)), true));
+ jthrowable t = static_cast<jthrowable>(jenv->NewObject(clazz, method, reinterpret_cast<uintptr_t>(new $1_type($1)), true));
assert(t != NULL && jenv->ExceptionOccurred() == NULL);
int status = jenv->Throw(t);
assert(status == 0);
@@ -142,7 +142,7 @@ std::set<JavaInputStreamAdapter*> CVC4::JavaInputStreamAdapter::s_adapters;
assert(clazz != NULL && jenv->ExceptionOccurred() == NULL);
jmethodID method = jenv->GetMethodID(clazz, "<init>", "(JZ)V");
assert(method != NULL && jenv->ExceptionOccurred() == NULL);
- jthrowable t = static_cast<jthrowable>(jenv->NewObject(clazz, method, reinterpret_cast<long>(new $1_type($1)), true));
+ jthrowable t = static_cast<jthrowable>(jenv->NewObject(clazz, method, reinterpret_cast<uintptr_t>(new $1_type($1)), true));
assert(t != NULL && jenv->ExceptionOccurred() == NULL);
int status = jenv->Throw(t);
assert(status == 0);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback