diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | include/jni.h | 42 |
2 files changed, 26 insertions, 20 deletions
@@ -1,3 +1,7 @@ +2004-07-07 Guilhem Lavaux <guilhem@kaffe.org> + + * include/jni.h: Fixed compilation in C++ mode. + 2004-07-07 Steven Augart <augart@watson.ibm.com> * gnu/java/awt/peer/gtk/GtkMainThread.java (run): Pass the value of diff --git a/include/jni.h b/include/jni.h index 165186ca2..b973f536e 100644 --- a/include/jni.h +++ b/include/jni.h @@ -54,7 +54,26 @@ typedef jint jsize; #ifdef __cplusplus } #endif - + +/* + * Before jni.h is #included within a typical JVM, the source code should + * #define _JNI_VM_INTERNAL_TYPES_DEFINED and provide the real declarations + * for 'jobject', 'jfieldID', 'jMethodID' and other implementation types. + * If _JNI_VM_INTERNAL_TYPES_DEFINED is not defined, the following + * declares the old versions of the types. + */ +#ifndef _JNI_VM_INTERNAL_TYPES_DEFINED +/* +typedef void *jobject; +typedef void *jfieldID; +typedef void *jmethodID; +*/ +struct _jfieldID; +struct _jmethodID; +typedef struct _jfieldID *jfieldID; +typedef struct _jmethodID *jmethodID; +#endif + #ifdef __cplusplus class _jobject {}; @@ -92,25 +111,7 @@ typedef struct _Jv_JavaVM JavaVM; #else /* __cplusplus */ -/* - * Before jni.h is #included within a typical JVM, the source code should - * #define _JNI_VM_INTERNAL_TYPES_DEFINED and provide the real declarations - * for 'jobject', 'jfieldID', 'jMethodID' and other implementation types. - * If _JNI_VM_INTERNAL_TYPES_DEFINED is not defined, the following - * declares the old versions of the types. - */ -#ifndef _JNI_VM_INTERNAL_TYPES_DEFINED -/* -typedef void *jobject; -typedef void *jfieldID; -typedef void *jmethodID; -*/ -struct _jfieldID; -struct _jmethodID; -typedef struct _jfieldID *jfieldID; -typedef struct _jmethodID *jmethodID; -#endif - + typedef void *jobject; typedef jobject jclass; typedef jobject jstring; @@ -467,6 +468,7 @@ struct JNINativeInterface }; #ifdef __cplusplus +} /* Extern "C" */ struct _Jv_JNIEnv { |