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: javah, volatile, and CNI


I'm checking this in.

This fixes the 'volatile' problem that Andrew pointed out.
I just put this in Classpath, the libjava change also updates the .h
files.

Tom

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

	* Updated headers.

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

	* tools/gnu/classpath/tools/javah/FieldHelper.java (print): Print
	'volatile' after field type.

Index: classpath/tools/gnu/classpath/tools/javah/FieldHelper.java
===================================================================
--- classpath/tools/gnu/classpath/tools/javah/FieldHelper.java	(revision 121196)
+++ classpath/tools/gnu/classpath/tools/javah/FieldHelper.java	(working copy)
@@ -1,5 +1,5 @@
 /* FieldHelper.java - field helper methods for CNI
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
  This file is part of GNU Classpath.
 
@@ -52,12 +52,12 @@
     out.print("  ");
     if (Modifier.isStatic(field.access))
       out.print("static ");
-    if (Modifier.isVolatile(field.access))
-      out.print("volatile ");
     if ((field.value instanceof Integer) || (field.value instanceof Long))
       out.print("const ");
     out.print(Type.getType(field.desc));
     out.print(" ");
+    if (Modifier.isVolatile(field.access))
+      out.print("volatile ");
     boolean result = false;
     if (superType != null && ! Modifier.isStatic(field.access))
       {


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