This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: jni weak reference fix



I'm checking in this obvious fix..

2001-11-17  Anthony Green  <green@redhat.com>

	* jni.cc (unwrap): Fix test for wrapped objects.


Index: jni.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni.cc,v
retrieving revision 1.55
diff -c -r1.55 jni.cc
*** jni.cc	2001/11/13 17:43:39	1.55
--- jni.cc	2001/11/17 21:28:37
***************
*** 212,218 ****
    using namespace gnu::gcj::runtime;
    // We can compare the class directly because JNIWeakRef is `final'.
    // Doing it this way is much faster.
!   if (obj == NULL || obj->getClass () == &JNIWeakRef::class$)
      return obj;
    JNIWeakRef *wr = reinterpret_cast<JNIWeakRef *> (obj);
    return reinterpret_cast<T *> (wr->get ());
--- 212,218 ----
    using namespace gnu::gcj::runtime;
    // We can compare the class directly because JNIWeakRef is `final'.
    // Doing it this way is much faster.
!   if (obj == NULL || obj->getClass () != &JNIWeakRef::class$)
      return obj;
    JNIWeakRef *wr = reinterpret_cast<JNIWeakRef *> (obj);
    return reinterpret_cast<T *> (wr->get ());


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]