[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: jni.h
From: |
Michael Koch |
Subject: |
Patch: jni.h |
Date: |
Wed, 28 Apr 2004 09:55:10 +0200 |
User-agent: |
KMail/1.5.4 |
Hi list,
I was worried about some compiler warnings when compiling the native
part of the gtk peer. So I digged a little bit. In jni.h in GNU
classpath GetStringUTFChars returns "const jbyte *". This gives
compiler warnings when assigning the return value to a "const char *"
variable. I found out that in jni.h from GCJ (3.3 and 3.5) and jni.h
from Mozilla GetStringUTFChars returns "const char *" which is much
more logical and seems to be the right thing. JNI 1.1 spec says it
should return "const jbyte *". I search a little bit with google and
jni.h in other open source projects use "const char *" too. Now I
really wonder what we should do ? Should we leave it like it is and
cast to "const char *" in all instances we use GetStringUTFChars in out
own code or should we just apply the attached patch to change our
jni.h.
What do you think ?
Michael
2004-04-28 Michael Koch <address@hidden>
* include/jni.h.in (GetStringUTFChars):
Made it return const char * instead of const jbyte *.
jni.diff
Description: Text Data
- Patch: jni.h,
Michael Koch <=
Re: Patch: jni.h, Tom Tromey, 2004/04/28