aboutsummaryrefslogtreecommitdiff
path: root/libjava/include
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2007-01-22 23:04:16 +0000
committerTom Tromey <tromey@gcc.gnu.org>2007-01-22 23:04:16 +0000
commit262fa8a4b5f0e5859a4f059e0bb16a94e7bbe781 (patch)
tree5a65b021fa1dfa6c969e6de00c7e6ecfad3b93d9 /libjava/include
parentc8832aae41666f2632fb54adc2ca04c1a991cce4 (diff)
downloadgcc-262fa8a4b5f0e5859a4f059e0bb16a94e7bbe781.zip
gcc-262fa8a4b5f0e5859a4f059e0bb16a94e7bbe781.tar.gz
gcc-262fa8a4b5f0e5859a4f059e0bb16a94e7bbe781.tar.bz2
re PR java/29812 (env->klass value is not updated during the native calls)
PR java/29812: * testsuite/libjava.jni/pr29812.java: New file. * testsuite/libjava.jni/pr29812_injar.java: New file. * testsuite/libjava.jni/pr29812_injar.jar: New file. * testsuite/libjava.jni/pr29812.out: New file. * testsuite/libjava.jni/pr29812_injar.c: New file. * testsuite/libjava.jni/pr29812_injar.h: New file. * testsuite/libjava.jni/pr29812.jar: New file. * testsuite/libjava.jni/pr29812.c: New file. * testsuite/libjava.jni/pr29812.h: New file. * testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation): New proc. (gcj_jni_invocation_test_one): Use it. (gcj_jni_pr29812): New proc. (gcj_jni_run): Use it. * java/lang/natRuntime.cc (_load): Push a new system frame before calling JNI_OnLoad. * include/jvm.h (_Jv_JNI_PopSystemFrame): Declare. (_Jv_GetJNIEnvNewFrameWithLoader): Likewise. * jni.cc (struct _Jv_JNI_LocalFrame) <marker>: Now unsigned char. <allocated_p>: Now bool. <loader>: New field. (_Jv_JNI_EnsureLocalCapacity): Updated. (_Jv_JNI_NewLocalRef): Likewise. (_Jv_JNI_NewLocalRef): Likewise. (_Jv_JNI_PopLocalFrame): Likewise. (_Jv_JNI_FindClass): Likewise. (_Jv_GetJNIEnvNewFrame): Likewise. (_Jv_JNI_AttachCurrentThread): Likewise. (_Jv_GetJNIEnvNewFrameWithLoader): New function. (_Jv_GetJNIEnvNewFrame): Use it. * include/jni_md.h (_CLASSPATH_JNIENV_CONTENTS): Removed 'klass'. From-SVN: r121064
Diffstat (limited to 'libjava/include')
-rw-r--r--libjava/include/jni_md.h5
-rw-r--r--libjava/include/jvm.h4
2 files changed, 3 insertions, 6 deletions
diff --git a/libjava/include/jni_md.h b/libjava/include/jni_md.h
index c550338..6ea90ab 100644
--- a/libjava/include/jni_md.h
+++ b/libjava/include/jni_md.h
@@ -1,5 +1,5 @@
/* jni_md.h
- Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005, 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -58,9 +58,6 @@ typedef struct _Jv_JavaVM JavaVM;
/* The current exception. */ \
jthrowable ex; \
\
- /* The class of the current native method. */ \
- jclass klass; \
- \
/* The chain of local frames. */ \
struct _Jv_JNI_LocalFrame *locals; \
\
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h
index 2da13bc..9a99a95 100644
--- a/libjava/include/jvm.h
+++ b/libjava/include/jvm.h
@@ -592,8 +592,8 @@ void _Jv_SetCurrentJNIEnv (_Jv_JNIEnv *);
/* Free a JNIEnv. */
void _Jv_FreeJNIEnv (_Jv_JNIEnv *);
-/* Free a JNIEnv. */
-void _Jv_FreeJNIEnv (_Jv_JNIEnv *);
+extern "C" void _Jv_JNI_PopSystemFrame (_Jv_JNIEnv *);
+_Jv_JNIEnv *_Jv_GetJNIEnvNewFrameWithLoader (::java::lang::ClassLoader *);
struct _Jv_JavaVM;
_Jv_JavaVM *_Jv_GetJavaVM ();