classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: jni.h


From: C. Brian Jones
Subject: Re: Patch: jni.h
Date: Wed, 28 Apr 2004 13:55:22 -0400

On Wed, 2004-04-28 at 12:57, Tom Tromey wrote:
> >>>>> "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.

I think because jni_md.h is generated and to simplify the INCLUDES in
Makefile.am during build.

Brian

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]