* src/native/jni.c (_Jv_JNI_GetVersion): Return JNI_VERSION_1_6.
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Thu, 30 Aug 2007 11:28:13 +0000 (13:28 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Thu, 30 Aug 2007 11:28:13 +0000 (13:28 +0200)
(GetObjectRefType): New function.
(_Jv_JNINativeInterface): Added jni_GetObjectRefType.
* src/native/vm/sun/jvm.c (JVM_IsSupportedJNIVersion): Added
JNI_VERSION_1_6.

src/native/jni.c
src/native/vm/sun/jvm.c

index a28cd68df14fa8481bda0f7a7d8034280a0b197d..6edb14164f973c356d56835947a3edb99ae2a1a1 100644 (file)
@@ -910,11 +910,11 @@ java_handle_t *_Jv_jni_invokeNative(methodinfo *m, java_handle_t *o,
 
 jint _Jv_JNI_GetVersion(JNIEnv *env)
 {
-       STATISTICS(jniinvokation());
+       TRACEJNICALLS("_Jv_JNI_GetVersion(env=%p)", env);
 
-       /* we support JNI 1.4 */
+       /* We support JNI 1.6. */
 
-       return JNI_VERSION_1_4;
+       return JNI_VERSION_1_6;
 }
 
 
@@ -3686,6 +3686,22 @@ jlong _Jv_JNI_GetDirectBufferCapacity(JNIEnv* env, jobject buf)
 }
 
 
+/* GetObjectRefType ************************************************************
+
+   Returns the type of the object referred to by the obj argument. The
+   argument obj can either be a local, global or weak global
+   reference.
+
+*******************************************************************************/
+
+jobjectRefType jni_GetObjectRefType(JNIEnv *env, jobject obj)
+{
+       log_println("jni_GetObjectRefType: IMPLEMENT ME!");
+
+       return -1;
+}
+
+
 /* DestroyJavaVM ***************************************************************
 
    Unloads a Java VM and reclaims its resources. Only the main thread
@@ -4129,7 +4145,7 @@ struct JNINativeInterface_ _Jv_JNINativeInterface = {
 
        _Jv_JNI_GetJavaVM,
 
-       /* new JNI 1.2 functions */
+       /* New JNI 1.2 functions. */
 
        _Jv_JNI_GetStringRegion,
        _Jv_JNI_GetStringUTFRegion,
@@ -4145,11 +4161,15 @@ struct JNINativeInterface_ _Jv_JNINativeInterface = {
 
        _Jv_JNI_ExceptionCheck,
 
-       /* new JNI 1.4 functions */
+       /* New JNI 1.4 functions. */
 
        _Jv_JNI_NewDirectByteBuffer,
        _Jv_JNI_GetDirectBufferAddress,
-       _Jv_JNI_GetDirectBufferCapacity
+       _Jv_JNI_GetDirectBufferCapacity,
+
+       /* New JNI 1.6 functions. */
+
+       jni_GetObjectRefType
 };
 
 
index bc6b675de62a44f0cae86d6823ca4a5c22733e31..b4bc9d56543551e45a1786841e5744a7758d05a0 100644 (file)
@@ -2561,6 +2561,7 @@ jboolean JVM_IsSupportedJNIVersion(jint version)
        case JNI_VERSION_1_1:
        case JNI_VERSION_1_2:
        case JNI_VERSION_1_4:
+       case JNI_VERSION_1_6:
                return true;
        default:
                return false;