From 559c970ef796b4d686b2179507ab0b42987f62d6 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Thu, 3 Nov 2016 09:06:58 +0000 Subject: [PATCH] NativeIntArray.cc: use ptr_to_jlong instead of a simple (long) cast On Win64 long is 32bit. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11878 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/prism/NativeIntArray.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prism/src/prism/NativeIntArray.cc b/prism/src/prism/NativeIntArray.cc index 2dfd6e43..62db4a2f 100644 --- a/prism/src/prism/NativeIntArray.cc +++ b/prism/src/prism/NativeIntArray.cc @@ -31,7 +31,7 @@ JNIEXPORT jlong JNICALL Java_prism_NativeIntArray_NIA_1CreateArray (JNIEnv * env, jclass cls, jint size) { int* a = new int[size]; - return (long) a; + return ptr_to_jlong(a); } JNIEXPORT void JNICALL Java_prism_NativeIntArray_NIA_1DeleteArray @@ -58,4 +58,4 @@ JNIEXPORT void JNICALL Java_prism_NativeIntArray_NIA_1SetAll int* a = (int *) jlong_to_ptr(ptr); for(int i = 0; i < count; i++) a[i+index] = value; -} \ No newline at end of file +}