[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch: jni.h
From: |
Tom Tromey |
Subject: |
Re: Patch: jni.h |
Date: |
28 Apr 2004 10:57:25 -0600 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>>>>> "Michael" == Michael Koch <address@hidden> 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
Re: Patch: jni.h,
Tom Tromey <=