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]

Patch: FYI: gjavah JNI header fix


I'm checking this in to Classpath, gcc svn trunk, and the RH 4.1
branch.

This fixes a buglet in gjavah.  gjavah should create a JNI header even
if the class has no native methods.  This is PR 30707.

Tom

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

	PR libgcj/30707:
	* tools/gnu/classpath/tools/javah/JniIncludePrinter.java
	(printClass): Always print a header.

Index: tools/gnu/classpath/tools/javah/JniIncludePrinter.java
===================================================================
--- tools/gnu/classpath/tools/javah/JniIncludePrinter.java	(revision 121660)
+++ tools/gnu/classpath/tools/javah/JniIncludePrinter.java	(working copy)
@@ -1,5 +1,5 @@
 /* JniIncludePrinter.java - Generate a JNI header file
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
  This file is part of GNU Classpath.
 
@@ -109,8 +109,6 @@
 
   public void printClass(ClassWrapper klass) throws IOException
   {
-    if (! klass.hasNativeMethod())
-      return;
     String xname = JniHelper.mangle(klass.name);
     JniPrintStream out 
       = (JniPrintStream) getPrintStream(klass.name.replace('/', '_') + ".h", 


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