>>>>> "Michael" == Michael Koch <[EMAIL PROTECTED]> writes:

Michael> I found out that in jni.h from GCJ (3.3 and 3.5) and jni.h 
Michael> from Mozilla GetStringUTFChars returns "const char *" which is much 
Michael> more logical and seems to be the right thing. JNI 1.1 spec says it 
Michael> should return "const jbyte *". I search a little bit with google and 
Michael> jni.h in other open source projects use "const char *" too.

IMO it should be `const char *'.  My reasons are that first, Sun does
this, so presumably most existing JNI source relies on this; second,
this makes more sense; and third, this is what the analogous
GetStringUTFRegion uses.

Note that your patch is insufficient.  You must also update the
GetStringUTFChars call in the C++ class later on in the file.

I think classpath and libgcj should completely share jni.h.  This
probably isn't too hard to get to, since the current classpath version
is a small fork from some earlier libgcj version.  We could put the
gcj-specific stuff into a `jni_md.h' that is gcj-specific if that
would make the task easier.

Also, why is the file `jni.h.in'?  I didn't see any configure
substitutions in it.

Tom


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to