1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# patch from gcj-overlay, not sure if by geki himself
# removes QA warning about strict-aliasing
--- callback.c.orig 2006-12-12 17:25:26.000000000 +0100
+++ callback.c 2006-12-12 18:11:34.000000000 +0100
@@ -250,12 +250,16 @@
#ifdef JNI_VERSION_1_2
if (IS_JNI_1_2) {
- (*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_2);
+ /* http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html */
+ /* jint GetEnv(JavaVM *vm, void **env, jint version); */
+ (*jvm)->GetEnv(jvm, (void *)&env, JNI_VERSION_1_2);
}
#endif
if (env == NULL) {
- (*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL);
+ /* http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html */
+ /* jint AttachCurrentThread(JavaVM *vm, JNIEnv **p_env, void *thr_args); */
+ (*jvm)->AttachCurrentThread(jvm, (void *)&env, NULL);
if (IS_JNI_1_2) detach = 1;
}
|