classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] jcl.c 64-bit fix


From: Christian Thalinger
Subject: [cp-patches] jcl.c 64-bit fix
Date: Wed, 14 Sep 2005 00:59:39 +0200

Hi!

Yesterday, after a long debugging session with fitzsim, i've found this
bug.

TWISTI

2005-09-14  Christian Thalinger  <address@hidden>

        * native/jni/classpath/jcl.c: Replaced undefined        
        POINTERS_ARE_64BIT with SIZEOF_VOID_P == 8.

Index: native/jni/classpath/jcl.c
===================================================================
RCS
file: /ahome/cacao/cacaocvs/cacao/src/classpath/native/jni/classpath/jcl.c,v
retrieving revision 1.6
diff -u -3 -p -r1.6 jcl.c
--- native/jni/classpath/jcl.c  10 Sep 2005 13:04:03 -0000      1.6
+++ native/jni/classpath/jcl.c  13 Sep 2005 22:54:30 -0000
@@ -193,7 +193,7 @@ JCL_NewRawDataObject (JNIEnv * env, void
 {
   if (rawDataClass == NULL)
     {
-#ifdef POINTERS_ARE_64BIT
+#if SIZEOF_VOID_P == 8
       rawDataClass = (*env)->FindClass (env,
"gnu/classpath/Pointer64");
       if (rawDataClass == NULL)
        {
@@ -253,7 +253,7 @@ JCL_NewRawDataObject (JNIEnv * env, void
        }
     }
 
-#ifdef POINTERS_ARE_64BIT
+#if SIZEOF_VOID_P == 8
   return (*env)->NewObject (env, rawDataClass, rawData_mid, (jlong)
data);
 #else
   return (*env)->NewObject (env, rawDataClass, rawData_mid, (jint)
data);
@@ -263,7 +263,7 @@ JCL_NewRawDataObject (JNIEnv * env, void
 JNIEXPORT void * JNICALL
 JCL_GetRawData (JNIEnv * env, jobject rawdata)
 {
-#ifdef POINTERS_ARE_64BIT
+#if SIZEOF_VOID_P == 8
   return (void *) (*env)->GetLongField (env, rawdata, rawData_fid);
 #else
   return (void *) (*env)->GetIntField (env, rawdata, rawData_fid);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]