diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-02 19:52:39 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-02 19:52:39 +0000 |
| commit | d485e5c703418a82d0cd51307d158a0f9e64d995 (patch) | |
| tree | e9438bde044933e11051bebcd9f11532f9836e2d /libjava | |
| parent | 89b644ae2daf8f6ce0565d0d9c0e7f1bcfd21edc (diff) | |
| download | ppe42-gcc-d485e5c703418a82d0cd51307d158a0f9e64d995.tar.gz ppe42-gcc-d485e5c703418a82d0cd51307d158a0f9e64d995.zip | |
* jni.cc (add_char): Correctly encode non-ascii characters.
(add_char): Define even when INTERPRETER not defined.
(mangled_name): Likewise.
(_Jv_GetJNIEnvNewFrame): Likewise.
(_Jv_LookupJNIMethod): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
| -rw-r--r-- | libjava/ChangeLog | 8 | ||||
| -rw-r--r-- | libjava/jni.cc | 10 |
2 files changed, 13 insertions, 5 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 259ba867723..29885aa1b34 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,11 @@ +2001-03-30 Tom Tromey <tromey@redhat.com> + + * jni.cc (add_char): Correctly encode non-ascii characters. + (add_char): Define even when INTERPRETER not defined. + (mangled_name): Likewise. + (_Jv_GetJNIEnvNewFrame): Likewise. + (_Jv_LookupJNIMethod): Likewise. + 2001-03-23 Kevin B Hendricks <khendricks@ivey.uwo.ca> * configure.host: Enable interpreter for PPC. diff --git a/libjava/jni.cc b/libjava/jni.cc index 7fac86ee126..b60823ee893 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -1595,8 +1595,6 @@ _Jv_JNI_UnregisterNatives (JNIEnv *, jclass) -#ifdef INTERPRETER - // Add a character to the buffer, encoding properly. static void add_char (char *buf, jchar c, int *here) @@ -1622,8 +1620,8 @@ add_char (char *buf, jchar c, int *here) else if (c == '/' || c == '.') buf[(*here)++] = '_'; else if ((c >= '0' && c <= '9') - || (c >= 'a' && c <= 'z') - || (c >= 'A' && c <= 'Z')) + || (c >= 'a' && c <= 'z') + || (c >= 'A' && c <= 'Z')) buf[(*here)++] = (char) c; else { @@ -1633,7 +1631,7 @@ add_char (char *buf, jchar c, int *here) for (int i = 0; i < 4; ++i) { int val = c & 0x0f; - buf[(*here) + 4 - i] = (val > 10) ? ('a' + val - 10) : ('0' + val); + buf[(*here) + 3 - i] = (val > 10) ? ('a' + val - 10) : ('0' + val); c >>= 4; } *here += 4; @@ -1753,6 +1751,8 @@ _Jv_LookupJNIMethod (jclass klass, _Jv_Utf8Const *name, return function; } +#ifdef INTERPRETER + // This function is the stub which is used to turn an ordinary (CNI) // method call into a JNI call. void |

