This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: another JNI header fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 27 Apr 2005 11:34:32 -0600
- Subject: [gcjx] Patch: FYI: another JNI header fix
- Reply-to: tromey at redhat dot com
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;
}