function signature "funny"

Peter Lovell <[email protected]> Wed, 8 Jun 2005 17:50:38 -0400
Newsgroups gmane.comp.java.vm.sablevm.devel
Message-ID <[email protected]>
Hi folks,
I'm trying to get all the warnings out of code we have and I ran into  
what seems to be to be an anomaly.

Considering the following snippet from jni.h

  typedef _svmt_s8 jbyte;

  const jbyte *(JNICALL *GetStringUTFChars) (JNIEnv *env, jstring  
string,
                           jboolean *isCopy);    /* 169 */
   void (JNICALL *ReleaseStringUTFChars) (JNIEnv *env, jstring string,
                       const char *utf);    /* 170 */

note also that jni_system_specific defines ...
typedef signed char _svmt_s8;


As I understand it (I'm not a java/jni expert), but I had thought  
that the return type for GetStringUTFChars should be the same as the  
arg type for the third argument "utf" of ReleaseStringUTFChars. In  
Sun's public java header jni.h the are the same ...

     const char* (JNICALL *GetStringUTFChars)
       (JNIEnv *env, jstring str, jboolean *isCopy);
     void (JNICALL *ReleaseStringUTFChars)
       (JNIEnv *env, jstring str, const char* chars);



Am I missing something here?

This is throwing up a bunch of warnings using gcc 4  such as ...
MacOSXAsset.c:234: warning: pointer targets in assignment differ in  
signedness

The headers were generated from 1.11 (recent although not quite  
latest) on Mac OS X 10.4

Thanks.....Peter