[kaffe] CVS kaffe (guilhem): Invocation API updated to support JNI 1.2 / jni.h imported from GNU Classpath /

Kaffe CVS cvs-commits at kaffe.org
Mon Jul 5 10:05:20 PDT 2004


PatchSet 4892 
Date: 2004/07/05 16:39:44
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Invocation API updated to support JNI 1.2 / jni.h imported from GNU Classpath / Code cleanups ++

	* kaffe/kaffevm/jit/native-wrapper.[ch],
	kaffe/kaffevm/jit3/native-wrapper.[ch],
	kaffe/kaffevm/intrp/native-wrapper.[ch]:
	Added copyright notice.

	* configure.ac: Changed jtypes.h to jni_md.h. Added
	definition for JNICALL and JNIEXPORT.
	* configure: Regenerated.

	* include/Makefile.am: Renamed jtypes.h.in to jni_md.h.in
	* include/Makefile.in: Regenerated.
	* include/kaffe/jtypes.h.in: Removed.
	* include/kaffe/jni_md.h.in: New file.
	* include/jni.h: Imported from GNU Classpath.
	* include/jvmpi.h: Added definition for jobjectID. Include jni.h
	* include/native.h: Use jni.h instead of jtypes.h
	* include/kaffe_jni.h: New file to describe JNI 1.1 interface for
	kaffe. Export global VM arguments/status.
	* include/defs.h: Define NULL it it is not defined.

	* kaffe/kaffe/version.h: Don't use JAVA_VERSION_HEX anymore.

	* kaffe/kaffevm/gtypes.h: Updated ABORT() and EXIT(). Use jni_md.h
	instead of jtypes.h

	* kaffe/kaffe/main.c,
	kaffe/kaffeh/mem.c,
	kaffe/kaffeh/support.c,
	kaffe/kaffevm/basecode.c,
	kaffe/kaffevm/funcs.c,
	kaffe/kaffevm/icode.c,
	kaffe/kaffevm/machine.c,
	kaffe/kaffevm/code.c,
	kaffe/kaffevm/debug.c,
	kaffe/kaffevm/classPool.c,
	kaffe/kaffevm/external.c,
	kaffe/kaffevm/gcFuncs.c,
	kaffe/kaffevm/itypes.c,
	kaffe/kaffevm/lookup.c,
	kaffe/kaffevm/registers.c,
	kaffe/kaffevm/object.c,
	kaffe/kaffevm/stackTrace.c,
	kaffe/kaffevm/stats.c,
	kaffe/kaffevm/string.c,
	kaffe/kaffevm/stringParsing.c,
	kaffe/kaffevm/support.c,
	kaffe/kaffevm/utf8const.c,
	kaffe/kaffevm/jit3/basecode.c,
	kaffe/kaffevm/jit3/funcs.c,
	kaffe/kaffevm/jit3/icode.c,
	kaffe/kaffevm/jit3/machine.c,
	kaffe/kaffevm/jit3/registers.c,
	kaffe/kaffevm/mem/gc-incremental.c,
	kaffe/kaffevm/mem/gc-mem.c,
	kaffe/kaffevm/verifier/verify.c,
	libraries/clib/io/ObjectInputStream.c,
	libraries/clib/management/Debug.c,
	Include kaffe_jni.h or jni_md.h. Updated Kaffe_JavaVMArgs.
	* kaffe/kaffevm/reflect.c, kaffe/kaffevm/reflect.h:
	New files.
	* kaffe/kaffevm/Makefile.am: Added reflect.[ch].
	* kaffe/kaffevm/Makefile.in: Regenerated.

	* kaffe/kaffevm/thread.c,
	kaffe/kaffevm/thread.h: Make possible to attach
	a daemon.

	* kaffe/kaffevm/classMethod.c,
	kaffe/kaffevm/hashtab.c,
	kaffe/kaffevm/systems/unix-jthreads/signal.c,
	kaffe/kaffevm/systems/unix-pthreads/signal.c: Include jmalloc.h

	* kaffe/kaffevm/jni/jni-arrays.c,
	kaffe/kaffevm/jni/jni-base.c,
	kaffe/kaffevm/jni/jni-callmethod.c,
	kaffe/kaffevm/jni/jni-fields.c,
	kaffe/kaffevm/jni/jni.c,
	kaffe/kaffevm/jni/jni_funcs.h,
	kaffe/kaffevm/jni/jni_i.h: Reindented.
	* kaffe/kaffevm/jni/Makefile.am: Added jni-helpers.c,
	jni-string.c

	* libraries/clib/native/Class.c: Moved makeMethod, makeField,
	makeConstructor and their subfunctions to reflect.[ch].
	Mark some functions as NONRETURNING as suggested by gcc.

	* libraries/clib/nio/NIOServerSocket.c: Include defs.h

Members: 
	ChangeLog:1.2458->1.2459 
	configure:1.343->1.344 
	configure.ac:1.42->1.43 
	include/Makefile.am:1.63->1.64 
	include/Makefile.in:1.166->1.167 
	include/defs.h:1.5->1.6 
	include/files.h:1.5->1.6 
	include/jni.h:1.29->1.30 
	include/jvmpi.h:1.4->1.5 
	include/kaffe_jni.h:INITIAL->1.1 
	include/native.h:1.14->1.15 
	include/kaffe/jni_md.h.in:INITIAL->1.1 
	include/kaffe/jtypes.h.in:1.1->1.2(DEAD) 
	kaffe/kaffe/main.c:1.57->1.58 
	kaffe/kaffe/version.h:1.1->1.2 
	kaffe/kaffeh/mem.c:1.6->1.7 
	kaffe/kaffeh/support.c:1.43->1.44 
	kaffe/kaffevm/Makefile.am:1.63->1.64 
	kaffe/kaffevm/Makefile.in:1.160->1.161 
	kaffe/kaffevm/baseClasses.c:1.52->1.53 
	kaffe/kaffevm/classMethod.c:1.119->1.120 
	kaffe/kaffevm/classPool.c:1.25->1.26 
	kaffe/kaffevm/code.c:1.13->1.14 
	kaffe/kaffevm/debug.c:1.52->1.53 
	kaffe/kaffevm/exception.c:1.84->1.85 
	kaffe/kaffevm/external.c:1.61->1.62 
	kaffe/kaffevm/findInJar.c:1.59->1.60 
	kaffe/kaffevm/gcFuncs.c:1.52->1.53 
	kaffe/kaffevm/gtypes.h:1.12->1.13 
	kaffe/kaffevm/hashtab.c:1.11->1.12 
	kaffe/kaffevm/itypes.c:1.30->1.31 
	kaffe/kaffevm/lookup.c:1.35->1.36 
	kaffe/kaffevm/object.c:1.24->1.25 
	kaffe/kaffevm/reflect.c:INITIAL->1.1 
	kaffe/kaffevm/reflect.h:INITIAL->1.1 
	kaffe/kaffevm/stackTrace.c:1.35->1.36 
	kaffe/kaffevm/stats.c:1.6->1.7 
	kaffe/kaffevm/string.c:1.32->1.33 
	kaffe/kaffevm/stringParsing.c:1.7->1.8 
	kaffe/kaffevm/support.c:1.67->1.68 
	kaffe/kaffevm/thread.c:1.67->1.68 
	kaffe/kaffevm/thread.h:1.19->1.20 
	kaffe/kaffevm/utf8const.c:1.38->1.39 
	kaffe/kaffevm/intrp/native-wrapper.c:1.1->1.2 
	kaffe/kaffevm/intrp/native-wrapper.h:1.1->1.2 
	kaffe/kaffevm/jit/native-wrapper.c:1.1->1.2 
	kaffe/kaffevm/jit/native-wrapper.h:1.1->1.2 
	kaffe/kaffevm/jit3/basecode.c:1.5->1.6 
	kaffe/kaffevm/jit3/funcs.c:1.11->1.12 
	kaffe/kaffevm/jit3/icode.c:1.40->1.41 
	kaffe/kaffevm/jit3/machine.c:1.52->1.53 
	kaffe/kaffevm/jit3/native-wrapper.c:1.1->1.2 
	kaffe/kaffevm/jit3/registers.c:1.13->1.14 
	kaffe/kaffevm/jni/Makefile.am:1.5->1.6 
	kaffe/kaffevm/jni/Makefile.in:1.8->1.9 
	kaffe/kaffevm/jni/jni-arrays.c:1.2->1.3 
	kaffe/kaffevm/jni/jni-base.c:1.1->1.2 
	kaffe/kaffevm/jni/jni-callmethod.c:1.1->1.2 
	kaffe/kaffevm/jni/jni-fields.c:1.1->1.2 
	kaffe/kaffevm/jni/jni-helpers.c:INITIAL->1.1 
	kaffe/kaffevm/jni/jni-string.c:INITIAL->1.1 
	kaffe/kaffevm/jni/jni.c:1.5->1.6 
	kaffe/kaffevm/jni/jni_funcs.h:1.2->1.3 
	kaffe/kaffevm/jni/jni_i.h:1.4->1.5 
	kaffe/kaffevm/mem/gc-incremental.c:1.81->1.82 
	kaffe/kaffevm/mem/gc-mem.c:1.59->1.60 
	kaffe/kaffevm/systems/unix-jthreads/signal.c:1.20->1.21 
	kaffe/kaffevm/systems/unix-pthreads/signal.c:1.4->1.5 
	kaffe/kaffevm/verifier/verify.c:1.5->1.6 
	libraries/clib/io/ObjectInputStream.c:1.2->1.3 
	libraries/clib/management/Debug.c:1.5->1.6 
	libraries/clib/native/Class.c:1.73->1.74 
	libraries/clib/nio/NIOServerSocket.c:1.3->1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2458 kaffe/ChangeLog:1.2459
--- kaffe/ChangeLog:1.2458	Mon Jul  5 14:12:44 2004
+++ kaffe/ChangeLog	Mon Jul  5 16:39:44 2004
@@ -1,3 +1,99 @@
+2004-07-04  Guilhem Lavaux <guilhem at kaffe.org>
+
+	* kaffe/kaffevm/jit/native-wrapper.[ch],
+	kaffe/kaffevm/jit3/native-wrapper.[ch],
+	kaffe/kaffevm/intrp/native-wrapper.[ch]:
+	Added copyright notice.
+
+	* configure.ac: Changed jtypes.h to jni_md.h. Added
+	definition for JNICALL and JNIEXPORT.
+	* configure: Regenerated.
+
+	* include/Makefile.am: Renamed jtypes.h.in to jni_md.h.in
+	* include/Makefile.in: Regenerated.
+	* include/kaffe/jtypes.h.in: Removed.
+	* include/kaffe/jni_md.h.in: New file.
+	* include/jni.h: Imported from GNU Classpath.
+	* include/jvmpi.h: Added definition for jobjectID. Include jni.h
+	* include/native.h: Use jni.h instead of jtypes.h
+	* include/kaffe_jni.h: New file to describe JNI 1.1 interface for
+	kaffe. Export global VM arguments/status.
+	* include/defs.h: Define NULL it it is not defined.
+
+	* kaffe/kaffe/version.h: Don't use JAVA_VERSION_HEX anymore.
+	
+	* kaffe/kaffevm/gtypes.h: Updated ABORT() and EXIT(). Use jni_md.h
+	instead of jtypes.h
+	
+	* kaffe/kaffe/main.c,
+	kaffe/kaffeh/mem.c,
+	kaffe/kaffeh/support.c, 
+	kaffe/kaffevm/basecode.c,
+	kaffe/kaffevm/funcs.c,
+	kaffe/kaffevm/icode.c,
+	kaffe/kaffevm/machine.c,
+	kaffe/kaffevm/code.c,
+	kaffe/kaffevm/debug.c,
+	kaffe/kaffevm/classPool.c,
+	kaffe/kaffevm/external.c,
+	kaffe/kaffevm/gcFuncs.c,
+	kaffe/kaffevm/itypes.c,
+	kaffe/kaffevm/lookup.c,
+	kaffe/kaffevm/registers.c,
+	kaffe/kaffevm/object.c,
+	kaffe/kaffevm/stackTrace.c,
+	kaffe/kaffevm/stats.c,
+	kaffe/kaffevm/string.c,
+	kaffe/kaffevm/stringParsing.c,
+	kaffe/kaffevm/support.c,
+	kaffe/kaffevm/utf8const.c,
+	kaffe/kaffevm/jit3/basecode.c,
+	kaffe/kaffevm/jit3/funcs.c,
+	kaffe/kaffevm/jit3/icode.c,
+	kaffe/kaffevm/jit3/machine.c,
+	kaffe/kaffevm/jit3/registers.c,
+	kaffe/kaffevm/mem/gc-incremental.c,
+	kaffe/kaffevm/mem/gc-mem.c,
+	kaffe/kaffevm/verifier/verify.c,
+	libraries/clib/io/ObjectInputStream.c,
+	libraries/clib/management/Debug.c,
+	Include kaffe_jni.h or jni_md.h. Updated Kaffe_JavaVMArgs.
+	* kaffe/kaffevm/reflect.c, kaffe/kaffevm/reflect.h:
+	New files.	
+	* kaffe/kaffevm/Makefile.am: Added reflect.[ch].
+	* kaffe/kaffevm/Makefile.in: Regenerated.
+
+	* kaffe/kaffevm/thread.c,
+	kaffe/kaffevm/thread.h: Make possible to attach
+	a daemon.
+	
+	* kaffe/kaffevm/classMethod.c,
+	kaffe/kaffevm/hashtab.c,
+	kaffe/kaffevm/systems/unix-jthreads/signal.c,
+	kaffe/kaffevm/systems/unix-pthreads/signal.c: Include jmalloc.h
+	
+	* kaffe/kaffevm/jni/jni-arrays.c, 
+	kaffe/kaffevm/jni/jni-base.c,
+	kaffe/kaffevm/jni/jni-callmethod.c,
+	kaffe/kaffevm/jni/jni-fields.c,
+	kaffe/kaffevm/jni/jni.c,
+	kaffe/kaffevm/jni/jni_funcs.h,
+	kaffe/kaffevm/jni/jni_i.h: Reindented.
+	* kaffe/kaffevm/jni/Makefile.am: Added jni-helpers.c,
+	jni-string.c
+	
+	* libraries/clib/native/Class.c: Moved makeMethod, makeField,
+	makeConstructor and their subfunctions to reflect.[ch].
+	Mark some functions as NONRETURNING as suggested by gcc.
+
+	* libraries/clib/nio/NIOServerSocket.c: Include defs.h
+	
+2004-07-04  Guilhem Lavaux <guilhem at kaffe.org>
+	
+	* kaffe/kaffevm/external.c
+	(loadNativeLibrary2): Renamed index to libIndex to fix warnings.
+	(unloadNativeLibrary): Likewise.
+	
 2004-07-05  Dalibor Topic  <robilad at kaffe.org>
 
         * configure.ac:
Index: kaffe/configure
diff -u kaffe/configure:1.343 kaffe/configure:1.344
--- kaffe/configure:1.343	Mon Jul  5 14:12:46 2004
+++ kaffe/configure	Mon Jul  5 16:39:47 2004
@@ -54569,6 +54569,17 @@
 
 
 
+cat >>confdefs.h <<_ACEOF
+#define JNICALL
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define JNIEXPORT
+_ACEOF
+
+
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -54862,7 +54873,7 @@
 
 subdirs="$subdirs libltdl"
 
-                    ac_config_headers="$ac_config_headers config/config.h include/kaffe/jtypes.h"
+                    ac_config_headers="$ac_config_headers config/config.h include/kaffe/jni_md.h"
 
           ac_config_files="$ac_config_files Makefile"
 
@@ -55862,7 +55873,7 @@
   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
   "config/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config/config.h" ;;
-  "include/kaffe/jtypes.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/kaffe/jtypes.h" ;;
+  "include/kaffe/jni_md.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/kaffe/jni_md.h" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.42 kaffe/configure.ac:1.43
--- kaffe/configure.ac:1.42	Mon Jul  5 14:12:55 2004
+++ kaffe/configure.ac	Mon Jul  5 16:40:03 2004
@@ -1908,6 +1908,15 @@
 dnl -------------------------------------------------------------------------
 
 dnl =========================================================================
+dnl Define JNI call.
+dnl -------------------------------------------------------------------------
+
+AC_DEFINE_UNQUOTED(JNICALL, [])
+AC_DEFINE_UNQUOTED(JNIEXPORT, [])
+
+dnl -------------------------------------------------------------------------
+
+dnl =========================================================================
 dnl Extract path and dir separator information from paths.h
 dnl -------------------------------------------------------------------------
 
@@ -1957,7 +1966,7 @@
 
 
 AC_CONFIG_SUBDIRS([libltdl])
-AC_CONFIG_HEADERS([config/config.h include/kaffe/jtypes.h])
+AC_CONFIG_HEADERS([config/config.h include/kaffe/jni_md.h])
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([project.xml project.properties])
 AC_CONFIG_FILES([config/Makefile])
Index: kaffe/include/Makefile.am
diff -u kaffe/include/Makefile.am:1.63 kaffe/include/Makefile.am:1.64
--- kaffe/include/Makefile.am:1.63	Sun Jul  4 17:51:39 2004
+++ kaffe/include/Makefile.am	Mon Jul  5 16:40:08 2004
@@ -216,7 +216,8 @@
 include_HEADERS = \
 	jni.h \
 	jni_cpp.h \
-	jvmpi.h 
+	jvmpi.h \
+	kaffe_jni.h
 
 
 nodist_pkginclude_HEADERS = \
@@ -232,7 +233,7 @@
 	java_lang_Throwable.h \
 	java_lang_VMThrowable.h \
 	kaffe/jmalloc.h \
-	kaffe/jtypes.h 
+	kaffe/jni_md.h
 
 stamp-kaffeh:
 ## If KAFFEH does not exist, build it
@@ -337,7 +338,7 @@
 DISTCLEANFILES = \
 	$(DERIVED_HDRS) \
 	$(JNI_DERIVED_HDRS) \
-	kaffe/jtypes.h \
+	kaffe/jni_md.h \
 	stamp-h0all \
 	stamp-h1all \
 	stamp-libtritonusalsa \
Index: kaffe/include/Makefile.in
diff -u kaffe/include/Makefile.in:1.166 kaffe/include/Makefile.in:1.167
--- kaffe/include/Makefile.in:1.166	Sun Jul  4 17:51:39 2004
+++ kaffe/include/Makefile.in	Mon Jul  5 16:40:09 2004
@@ -73,7 +73,7 @@
 	$(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config/config.h \
-	$(top_builddir)/include/kaffe/jtypes.h
+	$(top_builddir)/include/kaffe/jni_md.h
 CONFIG_CLEAN_FILES =
 SOURCES =
 DIST_SOURCES =
@@ -521,7 +521,8 @@
 include_HEADERS = \
 	jni.h \
 	jni_cpp.h \
-	jvmpi.h 
+	jvmpi.h \
+	kaffe_jni.h
 
 nodist_pkginclude_HEADERS = \
 	$(INSTALL_DERIVED_HDRS) \
@@ -536,7 +537,7 @@
 	java_lang_Throwable.h \
 	java_lang_VMThrowable.h \
 	kaffe/jmalloc.h \
-	kaffe/jtypes.h 
+	kaffe/jni_md.h
 
 CLEANFILES = \
 	$(DERIVED_HDRS) \
@@ -549,7 +550,7 @@
 DISTCLEANFILES = \
 	$(DERIVED_HDRS) \
 	$(JNI_DERIVED_HDRS) \
-	kaffe/jtypes.h \
+	kaffe/jni_md.h \
 	stamp-h0all \
 	stamp-h1all \
 	stamp-libtritonusalsa \
Index: kaffe/include/defs.h
diff -u kaffe/include/defs.h:1.5 kaffe/include/defs.h:1.6
--- kaffe/include/defs.h:1.5	Wed Jun 25 23:09:14 2003
+++ kaffe/include/defs.h	Mon Jul  5 16:40:10 2004
@@ -61,4 +61,8 @@
 #  endif /* HAVE__VA_COPY */
 #endif /* HAVE_VA_COPY */
 
+#ifndef NULL
+#define NULL (void *)0
+#endif
+
 #endif /* __defs_h */
Index: kaffe/include/files.h
diff -u kaffe/include/files.h:1.5 kaffe/include/files.h:1.6
--- kaffe/include/files.h:1.5	Thu Jul 31 22:46:43 2003
+++ kaffe/include/files.h	Mon Jul  5 16:40:10 2004
@@ -14,7 +14,7 @@
 #include "config.h"
 #include "config-std.h"
 #include "config-io.h"
-#include <kaffe/jtypes.h>
+#include <kaffe/jni_md.h>
 #include <errno.h>
 
 #if defined(HAVE_STRING_H)
Index: kaffe/include/jni.h
diff -u kaffe/include/jni.h:1.29 kaffe/include/jni.h:1.30
--- kaffe/include/jni.h:1.29	Fri Apr 16 17:16:24 2004
+++ kaffe/include/jni.h	Mon Jul  5 16:40:10 2004
@@ -1,602 +1,1426 @@
-/*
- * jni.h
- * Java Native Interface.
- *
- * Copyright (c) 1996, 1997, 1998
- *	Transvirtual Technologies, Inc.  All rights reserved.
- *
- * See the file "license.terms" for information on usage and redistribution 
- * of this file. 
- */
+/* jni.h
+   Copyright (C) 2001, 2004  Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+ 
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+/* This file is based on jni.h from libgcj */
 
-#ifndef __jni_h
-#define	__jni_h
+#ifndef __CLASSPATH_JNI_H__
+#define __CLASSPATH_JNI_H__
 
-#include <stdio.h>
 #include <stdarg.h>
-#include <sys/types.h>
-#include "kaffe/jtypes.h"
-#include "kaffe/jmalloc.h"
 
-#if defined(__cplusplus)
-extern "C" {
-#endif
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+  
+#include "jni_md.h" 
 
-#ifndef NONRETURNING
-#define NONRETURNING
+typedef jint jsize;
+  
+#ifdef __cplusplus
+}
 #endif
+  
+#ifdef __cplusplus
+  
+class _jobject {};
+class _jclass : public _jobject {};
+class _jthrowable : public _jobject {};
+class _jstring : public _jobject {};
+class _jarray : public _jobject {};
+class _jbooleanArray : public _jarray {};
+class _jbyteArray : public _jarray {};
+class _jcharArray : public _jarray {};
+class _jshortArray : public _jarray {};
+class _jintArray : public _jarray {};
+class _jlongArray : public _jarray {};
+class _jfloatArray : public _jarray {};
+class _jdoubleArray : public _jarray {};
+class _jobjectArray : public _jarray {};
+
+typedef _jobject *jobject;
+typedef _jclass *jclass;
+typedef _jthrowable *jthrowable;
+typedef _jstring *jstring;
+typedef _jarray *jarray;
+typedef _jbooleanArray *jbooleanArray;
+typedef _jbyteArray *jbyteArray;
+typedef _jcharArray *jcharArray;
+typedef _jshortArray *jshortArray;
+typedef _jintArray *jintArray;
+typedef _jlongArray *jlongArray;
+typedef _jfloatArray *jfloatArray;
+typedef _jdoubleArray *jdoubleArray;
+typedef _jobjectArray *jobjectArray;
+
+typedef struct _Jv_JNIEnv JNIEnv;
+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;
+typedef jobject jarray;
+typedef jobject jthrowable;
+typedef jobject jobjectArray;
+typedef jobject jbyteArray;
+typedef jobject jshortArray;
+typedef jobject jintArray;
+typedef jobject jlongArray;
+typedef jobject jbooleanArray;
+typedef jobject jcharArray;
+typedef jobject jfloatArray;
+typedef jobject jdoubleArray;
+  
+/* Dummy defines.  */
+typedef const struct JNINativeInterface *JNIEnv;
+typedef const struct JNIInvokeInterface *JavaVM;
 
-#define	JNIEXPORT extern
-#define	JNICALL
+#endif /* __cplusplus */
 
-struct JNIEnv_;
-struct JNINativeInterface;
-struct JavaVM_;
-struct JNINativeMethod_;
+#define _Jv_va_list va_list
 
-typedef struct JavaVMAttachArgs {
-  void*	reserved0;
-} JavaVMAttachArgs;
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
 
-typedef struct JavaVMOption
+typedef union jvalue
 {
-  char *optionString;
-  void *extraInfo;
-} JavaVMOption;
+  jboolean z;
+  jbyte    b;
+  jchar    c;
+  jshort   s;
+  jint     i;
+  jlong    j;
+  jfloat   f;
+  jdouble  d;
+  jobject  l;
+} jvalue;
+      
+/* Used for jboolean type  */
+#define JNI_TRUE  1
+#define JNI_FALSE 0
+
+/* Used when releasing array elements.  */
+#define JNI_COMMIT 1
+#define JNI_ABORT  2
+
+/* FIXME: Could be wrong */
+typedef jobject jweak;  
+
+/* Version numbers.  */
+#define JNI_VERSION_1_1 0x00010001 /* JNI version 1.1 */
+#define JNI_VERSION_1_2 0x00010002 /* JNI version 1.2 */
+#define JNI_VERSION_1_4 0x00010004 /* JNI version 1.4 */
+    
+/* Error codes */
+#define JNI_OK            0
+#define JNI_ERR          (-1)
+#define JNI_EDETACHED    (-2)
+#define JNI_EVERSION     (-3)
+  
+/* These functions might be defined in libraries which we load; the
+   JNI implementation calls them at the appropriate times.  */
+JNIEXPORT jint JNICALL JNI_OnLoad (JavaVM *, void *);
+JNIEXPORT void JNICALL JNI_OnUnload (JavaVM *, void *);
+    
+/* 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_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
 
-typedef struct JavaVMInitArgs {
-	jint		version;
-	char**		properties;
-	jint		checkSource;
-	jint		nativeStackSize;
-	jint		javaStackSize;
-	jint		minHeapSize;
-	jint		maxHeapSize;
-	jint		verifyMode;
-	const char*	classpath;
-	const char*     bootClasspath;
-	jint		(*vfprintf)(FILE*, const char*, va_list);
-	void		(*exit)(jint) NONRETURNING;
-	void		(*abort)(void) NONRETURNING;
-	jint		enableClassGC;
-	jint		enableVerboseGC;
-	jint		disableAsyncGC;
-	jint		enableVerboseClassloading;
-	jint		enableVerboseJIT;
-	jint		enableVerboseCall;
-	jint		allocHeapSize;
-	const char*	classhome;
-	const char*	libraryhome;
-} JavaVMInitArgs;
 
-#if defined(__cplusplus)
-typedef JNIEnv_ JNIEnv;
-typedef JavaVM_ JavaVM;
-#else
-typedef const struct JNINativeInterface* JNIEnv;
-typedef const struct JNIInvokeInterface* JavaVM;
-#endif
+/* This structure is used when registering native methods.  */
+typedef struct
+{
+  char *name;
+  char *signature;
+  void *fnPtr;
+} JNINativeMethod;
 
-typedef struct JNINativeMethod_ JNINativeMethod;
-typedef struct JavaVMAttachArgs ThreadAttachArgs;
+struct JNINativeInterface
+{
+  void *reserved0;					       /* 0 */
+  void *reserved1;					       /* 1 */
+  void *reserved2;					       /* 2 */
+  void *reserved3;					       /* 3 */
+
+  jint     (JNICALL *GetVersion)                   (JNIEnv *);                               /* 4 */
+  jclass   (JNICALL *DefineClass)                  (JNIEnv *, const char *, jobject, const jbyte *, jsize); /* 5 */
+  jclass   (JNICALL *FindClass)                    (JNIEnv *, const char *);                 /* 6 */
+
+  jmethodID (JNICALL *FromReflectedMethod)	   (JNIEnv *, jobject);                      /* 7 */
+  jfieldID  (JNICALL *FromReflectedField)	   (JNIEnv *, jobject);                      /* 8 */
+  jobject   (JNICALL *ToReflectedMethod)	   (JNIEnv *, jclass, jmethodID, jboolean);  /* 9 */
+
+  jclass   (JNICALL *GetSuperclass)                (JNIEnv *, jclass);                       /* 10 */
+  jboolean (JNICALL *IsAssignableFrom)             (JNIEnv *, jclass, jclass);               /* 11 */
+
+  jobject  (JNICALL *ToReflectedField)		   (JNIEnv *, jclass, jfieldID, jboolean);   /* 12 */
+
+  jint     (JNICALL *Throw)                        (JNIEnv *, jthrowable);                   /* 13 */
+  jint     (JNICALL *ThrowNew)                     (JNIEnv *, jclass, const char *);         /* 14 */
+  jthrowable (JNICALL *ExceptionOccurred)          (JNIEnv *);                               /* 15 */
+  void     (JNICALL *ExceptionDescribe)            (JNIEnv *);                               /* 16 */
+  void     (JNICALL *ExceptionClear)               (JNIEnv *);                               /* 17 */
+  void     (JNICALL *FatalError)                   (JNIEnv *, const char *);                 /* 18 */
+
+  jint     (JNICALL *PushLocalFrame)		   (JNIEnv *, jint);                         /* 19 */
+  jobject  (JNICALL *PopLocalFrame)		   (JNIEnv *, jobject);                      /* 20 */
+
+  jobject  (JNICALL *NewGlobalRef)                 (JNIEnv *, jobject);                      /* 21 */
+  void     (JNICALL *DeleteGlobalRef)              (JNIEnv *, jobject);                      /* 22 */
+  void     (JNICALL *DeleteLocalRef)               (JNIEnv *, jobject);                      /* 23 */
+  jboolean (JNICALL *IsSameObject)                 (JNIEnv *, jobject, jobject);             /* 24 */
+
+  jobject  (JNICALL *NewLocalRef)		   (JNIEnv *, jobject);                      /* 25 */
+  jint     (JNICALL *EnsureLocalCapacity)	   (JNIEnv *, jint);                         /* 26 */
+
+  jobject  (JNICALL *AllocObject)                  (JNIEnv *, jclass);                       /* 27 */
+  jobject (JNICALL *NewObject)			   (JNIEnv *, jclass, jmethodID, ...);       /* 28 */
+  jobject (JNICALL *NewObjectV)			   (JNIEnv *, jclass, jmethodID, _Jv_va_list); /* 29 */
+  jobject (JNICALL *NewObjectA)			   (JNIEnv *, jclass, jmethodID, jvalue *);  /* 30 */
+
+  jclass   (JNICALL *GetObjectClass)               (JNIEnv *, jobject);                      /* 31 */
+  jboolean (JNICALL *IsInstanceOf)                 (JNIEnv *, jobject, jclass);              /* 32 */
+  jmethodID (JNICALL *GetMethodID)                 (JNIEnv *, jclass, const char *, const char *); /* 33 */
+
+  jobject 	(JNICALL *CallObjectMethod)	   (JNIEnv *, jobject, jmethodID, ...);         /* 34 */
+  jobject 	(JNICALL *CallObjectMethodV)	   (JNIEnv *, jobject, jmethodID, _Jv_va_list); /* 35 */
+  jobject 	(JNICALL *CallObjectMethodA)	   (JNIEnv *, jobject, jmethodID, jvalue *);    /* 36 */
+  jboolean 	(JNICALL *CallBooleanMethod)	   (JNIEnv *, jobject, jmethodID, ...);         /* 37 */
+  jboolean 	(JNICALL *CallBooleanMethodV)	   (JNIEnv *, jobject, jmethodID, _Jv_va_list); /* 38 */
+  jboolean 	(JNICALL *CallBooleanMethodA)	   (JNIEnv *, jobject, jmethodID, jvalue *);    /* 39 */
+  jbyte 	(JNICALL *CallByteMethod)	   (JNIEnv *, jobject, jmethodID, ...);         /* 40 */
+  jbyte 	(JNICALL *CallByteMethodV)	   (JNIEnv *, jobject, jmethodID, _Jv_va_list); /* 41 */
+  jbyte 	(JNICALL *CallByteMethodA)	   (JNIEnv *, jobject, jmethodID, jvalue *);    /* 42 */
+  jchar 	(JNICALL *CallCharMethod)	   (JNIEnv *, jobject, jmethodID, ...);         /* 43 */
+  jchar 	(JNICALL *CallCharMethodV)	   (JNIEnv *, jobject, jmethodID, _Jv_va_list); /* 44 */
+  jchar 	(JNICALL *CallCharMethodA)	   (JNIEnv *, jobject, jmethodID, jvalue *);    /* 45 */
+  jshort 	(JNICALL *CallShortMethod)	   (JNIEnv *, jobject, jmethodID, ...);         /* 46 */
+  jshort 	(JNICALL *CallShortMethodV)	   (JNIEnv *, jobject, jmethodID, _Jv_va_list); /* 47 */
+  jshort 	(JNICALL *CallShortMethodA)	   (JNIEnv *, jobject, jmethodID, jvalue *);    /* 48 */
+  jint 		(JNICALL *CallIntMethod)	   (JNIEnv *, jobject, jmethodID, ...);         /* 49 */
+  jint 		(JNICALL *CallIntMethodV)	   (JNIEnv *, jobject, jmethodID, _Jv_va_list); /* 50 */
+  jint 		(JNICALL *CallIntMethodA)	   (JNIEnv *, jobject, jmethodID, jvalue *);    /* 51 */
+  jlong 	(JNICALL *CallLongMethod)	   (JNIEnv *, jobject, jmethodID, ...);         /* 52 */
+  jlong 	(JNICALL *CallLongMethodV)	   (JNIEnv *, jobject, jmethodID, _Jv_va_list); /* 53 */
+  jlong 	(JNICALL *CallLongMethodA)	   (JNIEnv *, jobject, jmethodID, jvalue *);    /* 54 */
+  jfloat 	(JNICALL *CallFloatMethod)	   (JNIEnv *, jobject, jmethodID, ...);         /* 55 */
+  jfloat 	(JNICALL *CallFloatMethodV)	   (JNIEnv *, jobject, jmethodID, _Jv_va_list); /* 56 */
+  jfloat 	(JNICALL *CallFloatMethodA)	   (JNIEnv *, jobject, jmethodID, jvalue *);    /* 57 */
+  jdouble 	(JNICALL *CallDoubleMethod)	   (JNIEnv *, jobject, jmethodID, ...);         /* 58 */
+  jdouble 	(JNICALL *CallDoubleMethodV)	   (JNIEnv *, jobject, jmethodID, _Jv_va_list); /* 59 */
+  jdouble 	(JNICALL *CallDoubleMethodA)	   (JNIEnv *, jobject, jmethodID, jvalue *);    /* 60 */
+  void  	(JNICALL *CallVoidMethod)	   (JNIEnv *, jobject, jmethodID, ...);         /* 61 */
+  void  	(JNICALL *CallVoidMethodV)	   (JNIEnv *, jobject, jmethodID, _Jv_va_list); /* 62 */
+  void  	(JNICALL *CallVoidMethodA)	   (JNIEnv *, jobject, jmethodID, jvalue *);    /* 63 */
+
+  jobject   (JNICALL *CallNonvirtualObjectMethod)  (JNIEnv *, jobject, jclass, jmethodID, ...);          /* 64 */
+  jobject   (JNICALL *CallNonvirtualObjectMethodV) (JNIEnv *, jobject, jclass, jmethodID, _Jv_va_list);  /* 65 */
+  jobject   (JNICALL *CallNonvirtualObjectMethodA) (JNIEnv *, jobject, jclass, jmethodID, jvalue *);     /* 66 */
+  jboolean  (JNICALL *CallNonvirtualBooleanMethod) (JNIEnv *, jobject, jclass, jmethodID, ...);          /* 67 */
+  jboolean  (JNICALL *CallNonvirtualBooleanMethodV) (JNIEnv *, jobject, jclass, jmethodID, _Jv_va_list); /* 68 */
+  jboolean  (JNICALL *CallNonvirtualBooleanMethodA) (JNIEnv *, jobject, jclass, jmethodID, jvalue *);    /* 69 */
+  jbyte     (JNICALL *CallNonvirtualByteMethod)	   (JNIEnv *, jobject, jclass, jmethodID, ...);          /* 70 */
+  jbyte     (JNICALL *CallNonvirtualByteMethodV)   (JNIEnv *, jobject, jclass, jmethodID, _Jv_va_list);  /* 71 */
+  jbyte     (JNICALL *CallNonvirtualByteMethodA)   (JNIEnv *, jobject, jclass, jmethodID, jvalue *);     /* 72 */
+  jchar     (JNICALL *CallNonvirtualCharMethod)	   (JNIEnv *, jobject, jclass, jmethodID, ...);          /* 73 */
+  jchar     (JNICALL *CallNonvirtualCharMethodV)   (JNIEnv *, jobject, jclass, jmethodID, _Jv_va_list);  /* 74 */
+  jchar     (JNICALL *CallNonvirtualCharMethodA)   (JNIEnv *, jobject, jclass, jmethodID, jvalue *);     /* 75 */
+  jshort    (JNICALL *CallNonvirtualShortMethod)   (JNIEnv *, jobject, jclass, jmethodID, ...);          /* 76 */
+  jshort    (JNICALL *CallNonvirtualShortMethodV)  (JNIEnv *, jobject, jclass, jmethodID, _Jv_va_list);  /* 77 */
+  jshort    (JNICALL *CallNonvirtualShortMethodA)  (JNIEnv *, jobject, jclass, jmethodID, jvalue *);     /* 78 */
+  jint 	    (JNICALL *CallNonvirtualIntMethod)	   (JNIEnv *, jobject, jclass, jmethodID, ...);          /* 79 */
+  jint 	    (JNICALL *CallNonvirtualIntMethodV)	   (JNIEnv *, jobject, jclass, jmethodID, _Jv_va_list);  /* 80 */
+  jint 	    (JNICALL *CallNonvirtualIntMethodA)	   (JNIEnv *, jobject, jclass, jmethodID, jvalue *);     /* 81 */
+  jlong     (JNICALL *CallNonvirtualLongMethod)	   (JNIEnv *, jobject, jclass, jmethodID, ...);          /* 82 */
+  jlong     (JNICALL *CallNonvirtualLongMethodV)   (JNIEnv *, jobject, jclass, jmethodID, _Jv_va_list);  /* 83 */
+  jlong     (JNICALL *CallNonvirtualLongMethodA)   (JNIEnv *, jobject, jclass, jmethodID, jvalue *);     /* 84 */
+  jfloat    (JNICALL *CallNonvirtualFloatMethod)   (JNIEnv *, jobject, jclass, jmethodID, ...);          /* 85 */
+  jfloat    (JNICALL *CallNonvirtualFloatMethodV)  (JNIEnv *, jobject, jclass, jmethodID, _Jv_va_list);  /* 86 */
+  jfloat    (JNICALL *CallNonvirtualFloatMethodA)  (JNIEnv *, jobject, jclass, jmethodID, jvalue *);     /* 87 */
+  jdouble   (JNICALL *CallNonvirtualDoubleMethod)  (JNIEnv *, jobject, jclass, jmethodID, ...);          /* 88 */
+  jdouble   (JNICALL *CallNonvirtualDoubleMethodV) (JNIEnv *, jobject, jclass, jmethodID, _Jv_va_list);  /* 89 */
+  jdouble   (JNICALL *CallNonvirtualDoubleMethodA) (JNIEnv *, jobject, jclass, jmethodID, jvalue *);     /* 90 */
+  void      (JNICALL *CallNonvirtualVoidMethod)	   (JNIEnv *, jobject, jclass, jmethodID, ...);          /* 91 */
+  void      (JNICALL *CallNonvirtualVoidMethodV)   (JNIEnv *, jobject, jclass, jmethodID, _Jv_va_list);  /* 92 */
+  void      (JNICALL *CallNonvirtualVoidMethodA)   (JNIEnv *, jobject, jclass, jmethodID, jvalue *);     /* 93 */
+
+  jfieldID      (JNICALL *GetFieldID)              (JNIEnv *, jclass, const char *, const char *);  /* 94 */
+
+  jobject  (JNICALL *GetObjectField)               (JNIEnv *, jobject, jfieldID);                   /* 95 */
+  jboolean (JNICALL *GetBooleanField)              (JNIEnv *, jobject, jfieldID);                   /* 96 */
+  jbyte    (JNICALL *GetByteField)                 (JNIEnv *, jobject, jfieldID);                   /* 97 */
+  jchar    (JNICALL *GetCharField)                 (JNIEnv *, jobject, jfieldID);                   /* 98 */
+  jshort   (JNICALL *GetShortField)                (JNIEnv *, jobject, jfieldID);                   /* 99 */
+  jint     (JNICALL *GetIntField)                  (JNIEnv *, jobject, jfieldID);                   /* 100 */
+  jlong    (JNICALL *GetLongField)                 (JNIEnv *, jobject, jfieldID);                   /* 101 */
+  jfloat   (JNICALL *GetFloatField)                (JNIEnv *, jobject, jfieldID);                   /* 102 */
+  jdouble  (JNICALL *GetDoubleField)               (JNIEnv *, jobject, jfieldID);                   /* 103 */
+
+  void		(JNICALL *SetObjectField)	   (JNIEnv *, jobject, jfieldID, jobject);          /* 104 */
+  void		(JNICALL *SetBooleanField)	   (JNIEnv *, jobject, jfieldID, jboolean);         /* 105 */
+  void		(JNICALL *SetByteField)		   (JNIEnv *, jobject, jfieldID, jbyte);            /* 106 */
+  void		(JNICALL *SetCharField)		   (JNIEnv *, jobject, jfieldID, jchar);            /* 107 */
+  void		(JNICALL *SetShortField)	   (JNIEnv *, jobject, jfieldID, jshort);           /* 108 */
+  void		(JNICALL *SetIntField)		   (JNIEnv *, jobject, jfieldID, jint);             /* 109 */
+  void		(JNICALL *SetLongField)		   (JNIEnv *, jobject, jfieldID, jlong);            /* 110 */
+  void		(JNICALL *SetFloatField)	   (JNIEnv *, jobject, jfieldID, jfloat);           /* 111 */
+  void		(JNICALL *SetDoubleField)	   (JNIEnv *, jobject, jfieldID, jdouble);          /* 112 */
+
+  jmethodID (JNICALL *GetStaticMethodID)           (JNIEnv *, jclass, const char *, const char *);  /* 113 */
+
+  jobject 	(JNICALL *CallStaticObjectMethod)  (JNIEnv *, jclass, jmethodID, ...);              /* 114 */
+  jobject 	(JNICALL *CallStaticObjectMethodV) (JNIEnv *, jclass, jmethodID, _Jv_va_list);      /* 115 */
+  jobject 	(JNICALL *CallStaticObjectMethodA) (JNIEnv *, jclass, jmethodID, jvalue *);         /* 116 */
+  jboolean 	(JNICALL *CallStaticBooleanMethod) (JNIEnv *, jclass, jmethodID, ...);              /* 117 */
+  jboolean 	(JNICALL *CallStaticBooleanMethodV) (JNIEnv *, jclass, jmethodID, _Jv_va_list);     /* 118 */
+  jboolean 	(JNICALL *CallStaticBooleanMethodA) (JNIEnv *, jclass, jmethodID, jvalue *);        /* 119 */
+  jbyte 	(JNICALL *CallStaticByteMethod)    (JNIEnv *, jclass, jmethodID, ...);              /* 120 */
+  jbyte 	(JNICALL *CallStaticByteMethodV)   (JNIEnv *, jclass, jmethodID, _Jv_va_list);      /* 121 */
+  jbyte 	(JNICALL *CallStaticByteMethodA)   (JNIEnv *, jclass, jmethodID, jvalue *);         /* 122 */
+  jchar 	(JNICALL *CallStaticCharMethod)    (JNIEnv *, jclass, jmethodID, ...);              /* 123 */
+  jchar 	(JNICALL *CallStaticCharMethodV)   (JNIEnv *, jclass, jmethodID, _Jv_va_list);      /* 124 */
+  jchar 	(JNICALL *CallStaticCharMethodA)   (JNIEnv *, jclass, jmethodID, jvalue *);         /* 125 */
+  jshort 	(JNICALL *CallStaticShortMethod)   (JNIEnv *, jclass, jmethodID, ...);              /* 126 */
+  jshort 	(JNICALL *CallStaticShortMethodV)  (JNIEnv *, jclass, jmethodID, _Jv_va_list);      /* 127 */
+  jshort 	(JNICALL *CallStaticShortMethodA)  (JNIEnv *, jclass, jmethodID, jvalue *);         /* 128 */
+  jint 		(JNICALL *CallStaticIntMethod) 	   (JNIEnv *, jclass, jmethodID, ...);              /* 129 */
+  jint 		(JNICALL *CallStaticIntMethodV)    (JNIEnv *, jclass, jmethodID, _Jv_va_list);      /* 130 */
+  jint 		(JNICALL *CallStaticIntMethodA)    (JNIEnv *, jclass, jmethodID, jvalue *);         /* 131 */
+  jlong 	(JNICALL *CallStaticLongMethod)    (JNIEnv *, jclass, jmethodID, ...);              /* 132 */
+  jlong 	(JNICALL *CallStaticLongMethodV)   (JNIEnv *, jclass, jmethodID, _Jv_va_list);      /* 133 */
+  jlong 	(JNICALL *CallStaticLongMethodA)   (JNIEnv *, jclass, jmethodID, jvalue *);         /* 134 */
+  jfloat 	(JNICALL *CallStaticFloatMethod)   (JNIEnv *, jclass, jmethodID, ...);              /* 135 */
+  jfloat 	(JNICALL *CallStaticFloatMethodV)  (JNIEnv *, jclass, jmethodID, _Jv_va_list);      /* 136 */
+  jfloat 	(JNICALL *CallStaticFloatMethodA)  (JNIEnv *, jclass, jmethodID, jvalue *);         /* 137 */
+  jdouble 	(JNICALL *CallStaticDoubleMethod)  (JNIEnv *, jclass, jmethodID, ...);              /* 138 */
+  jdouble 	(JNICALL *CallStaticDoubleMethodV) (JNIEnv *, jclass, jmethodID, _Jv_va_list);      /* 139 */
+  jdouble 	(JNICALL *CallStaticDoubleMethodA) (JNIEnv *, jclass, jmethodID, jvalue *);         /* 140 */
+  void  	(JNICALL *CallStaticVoidMethod)    (JNIEnv *, jclass, jmethodID, ...);              /* 141 */
+  void  	(JNICALL *CallStaticVoidMethodV)   (JNIEnv *, jclass, jmethodID, _Jv_va_list);      /* 142 */
+  void  	(JNICALL *CallStaticVoidMethodA)   (JNIEnv *, jclass, jmethodID, jvalue *);         /* 143 */
+
+  jfieldID      (JNICALL *GetStaticFieldID)        (JNIEnv *, jclass, const char *, const char *);  /* 144 */
+
+  jobject	(JNICALL *GetStaticObjectField)	   (JNIEnv *, jclass, jfieldID);                    /* 145 */
+  jboolean	(JNICALL *GetStaticBooleanField)   (JNIEnv *, jclass, jfieldID);                    /* 146 */
+  jbyte		(JNICALL *GetStaticByteField)	   (JNIEnv *, jclass, jfieldID);                    /* 147 */
+  jchar		(JNICALL *GetStaticCharField)	   (JNIEnv *, jclass, jfieldID);                    /* 148 */
+  jshort	(JNICALL *GetStaticShortField)	   (JNIEnv *, jclass, jfieldID);                    /* 149 */
+  jint		(JNICALL *GetStaticIntField)	   (JNIEnv *, jclass, jfieldID);                    /* 150 */
+  jlong		(JNICALL *GetStaticLongField)	   (JNIEnv *, jclass, jfieldID);                    /* 151 */
+  jfloat	(JNICALL *GetStaticFloatField)	   (JNIEnv *, jclass, jfieldID);                    /* 152 */
+  jdouble	(JNICALL *GetStaticDoubleField)	   (JNIEnv *, jclass, jfieldID);                    /* 153 */
+
+  void 		(JNICALL *SetStaticObjectField)	   (JNIEnv *, jclass, jfieldID, jobject);           /* 154 */
+  void 		(JNICALL *SetStaticBooleanField)   (JNIEnv *, jclass, jfieldID, jboolean);          /* 155 */
+  void 		(JNICALL *SetStaticByteField)	   (JNIEnv *, jclass, jfieldID, jbyte);             /* 156 */
+  void 		(JNICALL *SetStaticCharField)	   (JNIEnv *, jclass, jfieldID, jchar);             /* 157 */
+  void 		(JNICALL *SetStaticShortField)	   (JNIEnv *, jclass, jfieldID, jshort);            /* 158 */
+  void 		(JNICALL *SetStaticIntField)	   (JNIEnv *, jclass, jfieldID, jint);              /* 159 */
+  void 		(JNICALL *SetStaticLongField)	   (JNIEnv *, jclass, jfieldID, jlong);             /* 160 */
+  void 		(JNICALL *SetStaticFloatField)	   (JNIEnv *, jclass, jfieldID, jfloat);            /* 161 */
+  void 		(JNICALL *SetStaticDoubleField)	   (JNIEnv *, jclass, jfieldID, jdouble);           /* 162 */
+
+  jstring  (JNICALL *NewString)                    (JNIEnv *, const jchar *, jsize);                /* 163 */
+  jsize    (JNICALL *GetStringLength)              (JNIEnv *, jstring);                             /* 164 */
+  const jchar * (JNICALL *GetStringChars)          (JNIEnv *, jstring, jboolean *);                 /* 165 */
+  void     (JNICALL *ReleaseStringChars)           (JNIEnv *, jstring, const jchar *);              /* 166 */
+  jstring  (JNICALL *NewStringUTF)                 (JNIEnv *, const char *);                        /* 167 */
+  jsize    (JNICALL *GetStringUTFLength)           (JNIEnv *, jstring);                             /* 168 */
+  const char * (JNICALL *GetStringUTFChars)       (JNIEnv *, jstring, jboolean *);                 /* 169 */
+  void     (JNICALL *ReleaseStringUTFChars)        (JNIEnv *, jstring, const char *);               /* 170 */
+  jsize    (JNICALL *GetArrayLength)               (JNIEnv *, jarray);                              /* 171 */
+  jarray   (JNICALL *NewObjectArray)               (JNIEnv *, jsize, jclass, jobject);              /* 172 */
+  jobject  (JNICALL *GetObjectArrayElement)        (JNIEnv *, jobjectArray, jsize);                 /* 173 */
+  void     (JNICALL *SetObjectArrayElement)        (JNIEnv *, jobjectArray, jsize, jobject);        /* 174 */
+
+  jbooleanArray (JNICALL *NewBooleanArray)	   (JNIEnv *, jsize);                               /* 175 */
+  jbyteArray    (JNICALL *NewByteArray)		   (JNIEnv *, jsize);                               /* 176 */
+  jcharArray    (JNICALL *NewCharArray)		   (JNIEnv *, jsize);                               /* 177 */
+  jshortArray   (JNICALL *NewShortArray)	   (JNIEnv *, jsize);                               /* 178 */
+  jintArray     (JNICALL *NewIntArray)		   (JNIEnv *, jsize);                               /* 179 */
+  jlongArray    (JNICALL *NewLongArray)		   (JNIEnv *, jsize);                               /* 180 */
+  jfloatArray   (JNICALL *NewFloatArray)	   (JNIEnv *, jsize);                               /* 181 */
+  jdoubleArray  (JNICALL *NewDoubleArray)	   (JNIEnv *, jsize);                               /* 182 */
+
+  jboolean *	(JNICALL *GetBooleanArrayElements) (JNIEnv *, jbooleanArray, jboolean *);           /* 183 */
+  jbyte *	(JNICALL *GetByteArrayElements)	   (JNIEnv *, jbyteArray, jboolean *);              /* 184 */
+  jchar *	(JNICALL *GetCharArrayElements)	   (JNIEnv *, jcharArray, jboolean *);              /* 185 */
+  jshort *	(JNICALL *GetShortArrayElements)   (JNIEnv *, jshortArray, jboolean *);             /* 186 */
+  jint *	(JNICALL *GetIntArrayElements)	   (JNIEnv *, jintArray, jboolean *);               /* 187 */
+  jlong *	(JNICALL *GetLongArrayElements)	   (JNIEnv *, jlongArray, jboolean *);              /* 188 */
+  jfloat *	(JNICALL *GetFloatArrayElements)   (JNIEnv *, jfloatArray, jboolean *);             /* 189 */
+  jdouble *	(JNICALL *GetDoubleArrayElements)  (JNIEnv *, jdoubleArray, jboolean *);            /* 190 */
+
+  void		(JNICALL *ReleaseBooleanArrayElements) (JNIEnv *, jbooleanArray, jboolean *, jint); /* 191 */
+  void		(JNICALL *ReleaseByteArrayElements)    (JNIEnv *, jbyteArray, jbyte *, jint);       /* 192 */
+  void		(JNICALL *ReleaseCharArrayElements)    (JNIEnv *, jcharArray, jchar *, jint);       /* 193 */
+  void		(JNICALL *ReleaseShortArrayElements)   (JNIEnv *, jshortArray, jshort *, jint);     /* 194 */
+  void		(JNICALL *ReleaseIntArrayElements)     (JNIEnv *, jintArray, jint *, jint);         /* 195 */
+  void		(JNICALL *ReleaseLongArrayElements)    (JNIEnv *, jlongArray, jlong *, jint);       /* 196 */
+  void		(JNICALL *ReleaseFloatArrayElements)   (JNIEnv *, jfloatArray, jfloat *, jint);     /* 197 */
+  void		(JNICALL *ReleaseDoubleArrayElements)  (JNIEnv *, jdoubleArray, jdouble *, jint);   /* 198 */
+
+  void 		(JNICALL *GetBooleanArrayRegion)   (JNIEnv *, jbooleanArray,jsize, jsize, jboolean *);  /* 199 */
+  void 		(JNICALL *GetByteArrayRegion)	   (JNIEnv *, jbyteArray, jsize, jsize, jbyte *);       /* 200 */
+  void 		(JNICALL *GetCharArrayRegion)	   (JNIEnv *, jcharArray, jsize, jsize, jchar *);       /* 201 */
+  void 		(JNICALL *GetShortArrayRegion)	   (JNIEnv *, jshortArray, jsize, jsize, jshort *);     /* 202 */
+  void 		(JNICALL *GetIntArrayRegion)	   (JNIEnv *, jintArray, jsize, jsize, jint *);         /* 203 */
+  void 		(JNICALL *GetLongArrayRegion)	   (JNIEnv *, jlongArray, jsize, jsize, jlong *);       /* 204 */
+  void 		(JNICALL *GetFloatArrayRegion)	   (JNIEnv *, jfloatArray, jsize, jsize, jfloat *);     /* 205 */
+  void 		(JNICALL *GetDoubleArrayRegion)	   (JNIEnv *, jdoubleArray, jsize, jsize, jdouble *);   /* 206 */
+
+  void 		(JNICALL *SetBooleanArrayRegion)   (JNIEnv *, jbooleanArray, jsize, jsize, jboolean *); /* 207 */
+  void 		(JNICALL *SetByteArrayRegion)	   (JNIEnv *, jbyteArray, jsize, jsize, jbyte *);       /* 208 */
+  void 		(JNICALL *SetCharArrayRegion)	   (JNIEnv *, jcharArray, jsize, jsize, jchar *);       /* 209 */
+  void 		(JNICALL *SetShortArrayRegion)	   (JNIEnv *, jshortArray, jsize, jsize, jshort *);     /* 210 */
+  void 		(JNICALL *SetIntArrayRegion)	   (JNIEnv *, jintArray, jsize, jsize, jint *);         /* 211 */
+  void 		(JNICALL *SetLongArrayRegion)	   (JNIEnv *, jlongArray, jsize, jsize, jlong *);       /* 212 */
+  void 		(JNICALL *SetFloatArrayRegion)	   (JNIEnv *, jfloatArray, jsize, jsize, jfloat *);     /* 213 */
+  void 		(JNICALL *SetDoubleArrayRegion)	   (JNIEnv *, jdoubleArray, jsize, jsize, jdouble *);   /* 214 */
+
+  jint     (JNICALL *RegisterNatives)              (JNIEnv *, jclass, const JNINativeMethod *, jint);   /* 215 */
+  jint     (JNICALL *UnregisterNatives)            (JNIEnv *, jclass);                                  /* 216 */
+  jint     (JNICALL *MonitorEnter)                 (JNIEnv *, jobject);                                 /* 217 */
+  jint     (JNICALL *MonitorExit)                  (JNIEnv *, jobject);                                 /* 218 */
+  jint     (JNICALL *GetJavaVM)                    (JNIEnv *, JavaVM **);                               /* 219 */
+
+  /* ---- JNI 1.2 functions ---- */
+  void	   (JNICALL *GetStringRegion)	           (JNIEnv *, jstring, jsize, jsize, jchar *);          /* 220 */
+  void     (JNICALL *GetStringUTFRegion)	   (JNIEnv *, jstring, jsize, jsize, char *);           /* 221 */
+
+  void * (JNICALL *GetPrimitiveArrayCritical)      (JNIEnv *, jarray, jboolean *);                      /* 222 */
+  void   (JNICALL *ReleasePrimitiveArrayCritical)  (JNIEnv *, jarray, void *, jint);                    /* 223 */
+
+  const jchar * (JNICALL *GetStringCritical)       (JNIEnv *, jstring, jboolean *);                     /* 224 */
+  void          (JNICALL *ReleaseStringCritical)   (JNIEnv *, jstring, const jchar *);                  /* 225 */
+
+  jweak  (JNICALL *NewWeakGlobalRef)               (JNIEnv *, jobject);                                 /* 226 */
+  void   (JNICALL *DeleteWeakGlobalRef)            (JNIEnv *, jweak);                                   /* 227 */
+
+  jboolean	(JNICALL *ExceptionCheck)	   (JNIEnv *);                                          /* 228 */
+
+  /* ---- JNI 1.4 functions ---- */
+  jobject       (JNICALL *NewDirectByteBuffer)     (JNIEnv *, void *, jlong);                           /* 229 */
+  void *        (JNICALL *GetDirectBufferAddress)  (JNIEnv *, jobject);                                 /* 230 */
+  long          (JNICALL *GetDirectBufferCapacity) (JNIEnv *, jobject);                                 /* 231 */
 
-typedef	void*	jobjectID;
-typedef	void*	jmethodID;
-typedef	void*	jfieldID;
-
-#define	JNI_TRUE	1
-#define	JNI_FALSE	0
-
-#define	JNI_COMMIT	1
-#define	JNI_ABORT	2
-
-/* JNI return codes */
-#define JNI_OK		0
-#define JNI_ERR		(-1)
-#define JNI_EDETACHED	(-2)
-#define JNI_EVERSION	(-3)
-
-struct JNINativeInterface {
-
-	void*	reserved0;

*** Patch too long, truncated ***




More information about the kaffe mailing list