[cp-patches] Patch: RFC: Always define jobjectRefType

Tom Tromey tromey at redhat.com
Wed Jun 11 17:22:49 UTC 2008


This patch changes Classpath's jni.h to always define jobjectRefType.
I don't see a reason it should be conditionally defined -- it is part
of the spec and, I think, all implementations will have to define it
in exactly the same way.

I'll check this in sometime soon-ish (Friday maybe) unless there are
objections.

thanks,
Tom

ChangeLog:
2008-06-11  Tom Tromey  <tromey at redhat.com>

	* include/jni.h (_jobjectRefType, jobjectRefType): Always
	declare.

Index: include/jni.h
===================================================================
RCS file: /cvsroot/classpath/classpath/include/jni.h,v
retrieving revision 1.11
diff -u -r1.11 jni.h
--- include/jni.h	30 Aug 2007 11:25:23 -0000	1.11
+++ include/jni.h	11 Jun 2008 17:21:06 -0000
@@ -1,5 +1,5 @@
 /* jni.h
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007  Free Software Foundation
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008  Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -136,16 +136,6 @@
 struct _jmethodID;
 typedef struct _jfieldID *jfieldID;
 typedef struct _jmethodID *jmethodID;
-
-enum _jobjectRefType
-{
-  JNIInvalidRefType    = 0,
-  JNILocalRefType      = 1,
-  JNIGlobalRefType     = 2,
-  JNIWeakGlobalRefType = 3 
-};
-
-typedef enum _jobjectRefType jobjectRefType;
 #endif 
 
 /* Version numbers.  */
@@ -164,6 +154,15 @@
 #define JNI_EDETACHED    (-2)
 #define JNI_EVERSION     (-3)
 
+enum _jobjectRefType
+{
+  JNIInvalidRefType    = 0,
+  JNILocalRefType      = 1,
+  JNIGlobalRefType     = 2,
+  JNIWeakGlobalRefType = 3 
+};
+
+typedef enum _jobjectRefType jobjectRefType;
 
 #ifdef __cplusplus
 extern "C"



More information about the Classpath-patches mailing list