This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Attached are some patches I had to make in order to get my JNI app to work.
1. jni-class-localref: Make localrefs for jclass values.
In the second paragraph of the second sentence at:
http://java.sun.com/j2se/1.3/docs/guide/jni/spec/design.doc.html#1242
it says "All Java objects are returned by JNI functions are local
references" and at:
http://java.sun.com/j2se/1.3/docs/guide/jni/spec/types.doc.html#428
..it shows that jclass is a subclass of jobject. So a function like
GetObjectClass should return a localref that can be destroyed by
DeleteLocalRef.
2. split local ref table from global ref table. The handles should be
unique as I understand JNI. The way it is now means that someone
can call DeleteGlobalRef on a local ref or vice-versa.
The first sentence of the first URL above says local and global
refs are in different categories.
3. included in #2 is a patch to set env->locals to erase mention
of dead frames. This was causing the _Jv_JNI_PopLocalFrame to crash.
make localrefs for jclass values
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |