This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gcjx] Patch: FYI: another JNI header fix


I'm checking this in on the gcjx branch.

We were emitting an '#undef' for a constant field's name, but not the
define itself.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* header/jni.cc (write_field): Actually emit #define.

Index: header/jni.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/header/Attic/jni.cc,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 jni.cc
--- header/jni.cc 27 Apr 2005 17:35:46 -0000 1.1.2.3
+++ header/jni.cc 27 Apr 2005 17:36:06 -0000
@@ -245,7 +245,8 @@
       || ! field->type ()->primitive_p ())
     return;
 
-  out << "#undef " << cname << "_" << field->get_name ()
+  out << "#undef " << cname << "_" << field->get_name () << std::endl
+      << "#define " << cname << "_" << field->get_name ()
       << " " << field->get_initializer ()->string_value ()
       << std::endl;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]