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: CNI headers -vs- interfaces


I'm checking this in on the gcjx branch.

In a CNI header we must show 'Object' as the superclass for an
interface, and we must emit the 'java_interface' attribute.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* header/cni.cc (generate): Superclass of interface is Object.
	Emit attribute for java interface.

Index: header/cni.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/header/Attic/cni.cc,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 cni.cc
--- header/cni.cc 17 Apr 2005 21:26:14 -0000 1.1.2.7
+++ header/cni.cc 27 Apr 2005 17:27:40 -0000
@@ -617,6 +617,8 @@
   out << "class " << cxxname (klass, false);
   if (klass->get_superclass ())
     out << " : public ::" << cxxname (klass->get_superclass (), false);
+  else
+    out << " : public ::java::lang::Object";
   out << std::endl;
   out << "{" << std::endl;
 
@@ -656,7 +658,11 @@
 
   out << "  static ::java::lang::Class class$;" << std::endl;
 
-  out << "};" << std::endl
+  out << "}";
+  if (klass->interface_p ())
+    out << " __attribute__ ((__java_interface__))";
+
+  out << ";" << std::endl
       << std::endl;
 
   emit_actions (out, CNI_APPEND, actions);


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