libgcj/4439: CNI: would be nice to be able to create Java array with 'new'

Tom Tromey tromey@redhat.com
Fri Oct 5 10:27:00 GMT 2001


>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:

Bryce> Tom, can we avoid including gcj/javaprims.h from jni.h?

Tom> I don't think it would be very easy :-(

Jeff> Why is that?

Actually it may be easier than I thought.

Jeff> jni.h must be useable with any good C/C++ compiler.

My concern was that jni.cc uses things like `jint' and `jobject',
which in that case must have the same definitions as the rest of
libgcj.  But that isn't a big problem -- we can have jni.h use
javaprims.h when used with g++.

The only remaining tricky part is getting the right typedefs into
jni.h.  This means either jni.h or some other header must be
platform-dependent.  This is a minor pain.  (Right now we already have
a problem here, I think, but we just ignore it...)

Tom



More information about the Gcc-bugs mailing list