summaryrefslogtreecommitdiff
path: root/include/jni.h
diff options
context:
space:
mode:
authorGuilhem Lavaux <guilhem@kaffe.org>2004-07-07 06:42:08 +0000
committerGuilhem Lavaux <guilhem@kaffe.org>2004-07-07 06:42:08 +0000
commit3f1e2f2bdd0c96cedda17fedadc3d8cfae4f354e (patch)
treea78a446aadd75fd2828bf9f1c2204e3c109b7914 /include/jni.h
parent6f9fb9019f12ed9d9568b5e05476a1097ed14cae (diff)
downloadclasspath-3f1e2f2bdd0c96cedda17fedadc3d8cfae4f354e.tar.gz
2004-07-07 Guilhem Lavaux <guilhem@kaffe.org>
* include/jni.h: Fixed compilation in C++ mode.
Diffstat (limited to 'include/jni.h')
-rw-r--r--include/jni.h42
1 files changed, 22 insertions, 20 deletions
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
{