[kaffe] CVS kaffe (guilhem): Fixed JNI according to the spec.

Kaffe CVS cvs-commits at kaffe.org
Wed Jul 7 00:21:54 PDT 2004


PatchSet 4900 
Date: 2004/07/07 07:16:01
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixed JNI according to the spec.

        * include/jni.h: Reverted the definition of JNI_CreateJavaVM to
        Classpath's one.

        * kaffe/kaffevm/jni/jni-base.c
        (JNI_CreateJavaVM): Modified prototype to follow JNI spec.

Members: 
	ChangeLog:1.2466->1.2467 
	include/jni.h:1.31->1.32 
	kaffe/kaffevm/jni/jni-base.c:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2466 kaffe/ChangeLog:1.2467
--- kaffe/ChangeLog:1.2466	Tue Jul  6 20:48:32 2004
+++ kaffe/ChangeLog	Wed Jul  7 07:16:01 2004
@@ -1,3 +1,11 @@
+2004-07-07  Guilhem Lavaux <guilhem at kaffe.org>
+
+	* include/jni.h: Reverted the definition of JNI_CreateJavaVM to
+	Classpath's one.
+
+	* kaffe/kaffevm/jni/jni-base.c
+	(JNI_CreateJavaVM): Modified prototype to follow JNI spec.
+
 2004-07-06  Dalibor Topic  <robilad at kaffe.org>
 
         * config/x86_64/linux/sigcontextinfo.h: Cleaned up.
Index: kaffe/include/jni.h
diff -u kaffe/include/jni.h:1.31 kaffe/include/jni.h:1.32
--- kaffe/include/jni.h:1.31	Tue Jul  6 16:57:16 2004
+++ kaffe/include/jni.h	Wed Jul  7 07:16:08 2004
@@ -183,7 +183,7 @@
 /* These functions are called by user code to start using the
    invocation API.  */
 JNIEXPORT jint JNICALL JNI_GetDefaultJavaVMInitArgs (void *);
-JNIEXPORT jint JNICALL JNI_CreateJavaVM (JavaVM **, JNIEnv **, void *);
+JNIEXPORT jint JNICALL JNI_CreateJavaVM (JavaVM **, void **, void *);
 JNIEXPORT jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
 
 
Index: kaffe/kaffe/kaffevm/jni/jni-base.c
diff -u kaffe/kaffe/kaffevm/jni/jni-base.c:1.4 kaffe/kaffe/kaffevm/jni/jni-base.c:1.5
--- kaffe/kaffe/kaffevm/jni/jni-base.c:1.4	Tue Jul  6 16:26:42 2004
+++ kaffe/kaffe/kaffevm/jni/jni-base.c	Wed Jul  7 07:16:08 2004
@@ -114,9 +114,10 @@
 }
 
 jint
-JNI_CreateJavaVM(JavaVM** vm, JNIEnv** env, void* args)
+JNI_CreateJavaVM(JavaVM** vm, void** penv, void* args)
 {
   JavaVMInitArgs *vm_args = (JavaVMInitArgs *)args;
+  JNIEnv **env = (JNIEnv **)penv;
 
   switch (vm_args->version)
     {
@@ -124,6 +125,7 @@
       memcpy(&Kaffe_JavaVMArgs, args, sizeof(Kaffe_JavaVMArgs));
       break;
     case JNI_VERSION_1_2:
+      memcpy(&Kaffe_JavaVMArgs, &Kaffe_JavaVMInitArgs, sizeof(Kaffe_JavaVMArgs));
       if (!KaffeJNI_ParseArgs(&Kaffe_JavaVMArgs, vm_args->options, vm_args->nOptions))
 	return -1;
       break;




More information about the kaffe mailing list