diff options
author | Marcus G. Daniels <mgd@swarm.org> | 2001-04-02 22:52:40 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-04-02 22:52:40 +0000 |
commit | 56f2b5bd7666ba14cb5166d5a0b19da3906e5c69 (patch) | |
tree | 76377b410583c11f673fbf7616d4e366b635770d | |
parent | 92c3688a97530f013adfd64a394b9a286a20128f (diff) | |
download | gcc-56f2b5bd7666ba14cb5166d5a0b19da3906e5c69.zip gcc-56f2b5bd7666ba14cb5166d5a0b19da3906e5c69.tar.gz gcc-56f2b5bd7666ba14cb5166d5a0b19da3906e5c69.tar.bz2 |
jni.cc (wrap_value<jclass>): New specialization.
2001-04-02 Marcus G. Daniels <mgd@swarm.org>
* jni.cc (wrap_value<jclass>): New specialization.
From-SVN: r41021
-rw-r--r-- | libjava/ChangeLog | 4 | ||||
-rw-r--r-- | libjava/jni.cc | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 2bc5aa8..b371a4e 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2001-04-02 Marcus G. Daniels <mgd@swarm.org> + + * jni.cc (wrap_value<jclass>): New specialization. + 2001-04-02 Tom Tromey <tromey@redhat.com> * java/io/PrintStream.java (out): Removed field. Fixes PR diff --git a/libjava/jni.cc b/libjava/jni.cc index b60823e..d41dd01 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -376,6 +376,15 @@ wrap_value (JNIEnv *env, jobject value) return value == NULL ? value : _Jv_JNI_NewLocalRef (env, value); } +template<> +static jclass +wrap_value (JNIEnv *env, jclass value) +{ + return (value == NULL + ? value + : (jclass) _Jv_JNI_NewLocalRef (env, (jobject) value)); +} + static jint |