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]
Other format: [Raw text]

Re: Conflicting JNI function decls


Danny Smith wrote:

From: "Tom Tromey"
| Danny> In function `java::lang::Object*
_Jv_JNI_ToReflectedField(JNIEnv*,
| Danny> java::lang::Class*, _Jv_Field*, jboolean)'
| Danny> : ../../../gcc/libjava/jni.cc:1612: error: new declaration
| Danny> `java::lang::Object* _Jv_JNI_ToReflectedField(JNIEnv*,
| Danny> java::lang::Class*, _Jv_Field*, jboolean)'
|
| This is just an oversight on our part.  These friend declarations are
| added by some code in Makefile.am -- care to take a stab at fixing
| them?  It might involve a little rearrangement since now Field.h will
| probably need to refer to jni.h.
|
| Tom


Hi, Attached patch ensures that the declarations of _Jv_JNI_ToReflectedMethod in java/lang/Class.h and in generated headers match the definition (with JNICALL attribute) in jni.cc.

Before I spend anymore time on this track, are there any problems with
including jni.h from the generated headers?

It probably doesn't break anything, but it would be preferrable to avoid including jni.h all over the place since it makes things more complex and could slow down the build as jni.h is quite large.

If we can come up with a way to get rid of the friend declarations (which are annoying in themselves), that would be a better solution.

Regards

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]