Patch: JNI fix from Marcus Daniels

Tom Tromey tromey@redhat.com
Thu Mar 22 09:41:00 GMT 2001


I'm checking this in to trunk and branch.

2001-03-22  Marcus G. Daniels  <mgd@swarm.org>

	* jni.cc (add_char): Handle `.' like `/'.

Tom

Index: jni.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni.cc,v
retrieving revision 1.36
diff -u -r1.36 jni.cc
--- jni.cc	2001/01/27 19:30:31	1.36
+++ jni.cc	2001/03/22 17:38:58
@@ -1612,7 +1612,10 @@
       buf[(*here)++] = '_';
       buf[(*here)++] = '3';
     }
-  else if (c == '/')
+
+  // Also check for `.' here because we might be passed an internal
+  // qualified class name like `foo.bar'.
+  else if (c == '/' || c == '.')
     buf[(*here)++] = '_';
   else if ((c >= '0' && c <= '9')
       || (c >= 'a' && c <= 'z')



More information about the Java-patches mailing list