* Patch: FYI: fix type of jni_env
@ 2007-01-17 1:35 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2007-01-17 1:35 UTC (permalink / raw)
To: GCJ-patches
I'm checking this in.
There was no reason for natThread::jni_env to be declared as void*.
I fixed this and removed a couple casts as a result.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java/lang/natThread.cc (finalize_native): Remove cast.
(_Jv_GetCurrentJNIEnv): Likewise.
* include/jvm.h (struct natThread) <jni_env>: Declare as
_Jv_JNIEnv*.
Index: include/jvm.h
===================================================================
--- include/jvm.h (revision 120843)
+++ include/jvm.h (working copy)
@@ -1,6 +1,6 @@
// jvm.h - Header file for private implementation information. -*- c++ -*-
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
This file is part of libgcj.
@@ -762,7 +762,7 @@
_Jv_Thread_t *thread;
// Each thread has its own JNI object.
- void *jni_env;
+ _Jv_JNIEnv *jni_env;
};
#endif /* __JAVA_JVM_H__ */
Index: java/lang/natThread.cc
===================================================================
--- java/lang/natThread.cc (revision 120843)
+++ java/lang/natThread.cc (working copy)
@@ -1,6 +1,6 @@
// natThread.cc - Native part of Thread class.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2006 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2006, 2007 Free Software Foundation
This file is part of libgcj.
@@ -441,7 +441,7 @@
java::lang::Thread *t = _Jv_ThreadCurrent ();
if (t == NULL)
return NULL;
- return (JNIEnv *)((natThread *) t->data)->jni_env;
+ return ((natThread *) t->data)->jni_env;
}
void
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-17 1:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-17 1:35 Patch: FYI: fix type of jni_env Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).