should be casting pointers passed to Java via JNI as jlong, not long
this was the only remaining place where this wasn't being done this way
This commit is contained in:
parent
3737998f60
commit
544e825362
|
@ -61,7 +61,7 @@ public class Bind {
|
|||
"JNIEXPORT jobject JNICALL Java_" + context.getPackageName() + "_Mirror_getInternalGame(JNIEnv * env, jobject obj){\n" +
|
||||
" jclass gamecls = env->FindClass(\"Lbwapi/Game;\");\n" +
|
||||
" jmethodID getMethodID = env->GetStaticMethodID(gamecls, \"get\", \"(J)Lbwapi/Game;\");\n" +
|
||||
" return env->CallStaticObjectMethod(gamecls, getMethodID, (long)BroodwarPtr);\n" +
|
||||
" return env->CallStaticObjectMethod(gamecls, getMethodID, (jlong)BroodwarPtr);\n" +
|
||||
"}\n"
|
||||
);
|
||||
out.println();
|
||||
|
|
|
@ -382,7 +382,7 @@ public class CallImplementer {
|
|||
out.println("*it;");
|
||||
}
|
||||
if (!javaContext.isValueType(genericType)) {
|
||||
out.println("jobject elem = env->CallStaticObjectMethod(elemClass, getMethodID, (long)elem_ptr) ;");
|
||||
out.println("jobject elem = env->CallStaticObjectMethod(elemClass, getMethodID, (jlong)elem_ptr) ;");
|
||||
} else {
|
||||
out.println("jobject elem = env->NewObject(elemClass, elemConsID" + javaContext.implementCopyReturn(genericType, "elem_ptr") + ")" + SEMICOLON);
|
||||
}
|
||||
|
|
Reference in a new issue