Re: function signature "funny"

David Bélanger <[email protected]> Sun, 12 Jun 2005 15:49:45 -0400
Newsgroups gmane.comp.java.vm.sablevm.devel
Message-ID <[email protected]>
On Sat, Jun 11, 2005 at 01:28:07PM -0400, Grzegorz B. Prokopski wrote:
> On Wed, 2005-08-06 at 17:50 -0400, Peter Lovell wrote:
> > 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;
> 
> Unless I misread, "const jbyte" becomes "const signed char".  Isn't that
> just about the same as "const char"?  I mean: "const char" is signed
> [*], isn't it?  Am I missing something or GCC4 is overpicky here?
> 

Maybe, but why in SableVM it is jbyte and not char?  A small mistake or
there is some reason behind using jbyte that I don't see?

David

---

David Bélanger
Web page:   http://www.cs.mcgill.ca/~dbelan2/
Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt