diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2017-10-25 19:50:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-25 19:50:08 -0700 |
commit | 668f31897cf90544d089f53f0f4499b828d7f84b (patch) | |
tree | f6418e58df5d9512adb11043f853fdea1398be82 /src/util/statistics.i | |
parent | 13c8e4a7b8575142ce9b70747969b71039389dfa (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/util/statistics.i')
-rw-r--r-- | src/util/statistics.i | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/statistics.i b/src/util/statistics.i index bd3a4eeb9..9ff6757d8 100644 --- a/src/util/statistics.i +++ b/src/util/statistics.i @@ -9,6 +9,8 @@ #endif /* SWIGJAVA */ %} +%include "stdint.i" + %rename(assign) CVC4::Statistics::operator=(const StatisticsBase&); %rename(assign) CVC4::Statistics::operator=(const Statistics& stats); @@ -62,7 +64,7 @@ jenv->SetObjectArrayElement($result, 0, jenv->NewStringUTF($1.first.c_str())); jclass clazz = jenv->FindClass("edu/nyu/acsys/CVC4/SExpr"); jmethodID methodid = jenv->GetMethodID(clazz, "<init>", "(JZ)V"); - jenv->SetObjectArrayElement($result, 1, jenv->NewObject(clazz, methodid, reinterpret_cast<long>(new CVC4::SExpr($1.second)), true)); + jenv->SetObjectArrayElement($result, 1, jenv->NewObject(clazz, methodid, reinterpret_cast<uintptr_t>(new CVC4::SExpr($1.second)), true)); }; #endif /* SWIGJAVA */ |