Conflicting JNI function decls

Bryce McKinlay mckinlay@redhat.com
Mon Aug 2 18:57:00 GMT 2004


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /