Author: mturk
Date: Sat Apr 18 06:15:46 2009
New Revision: 766234

URL: http://svn.apache.org/viewvc?rev=766234&view=rev
Log:
Add some 64-bit pointer fixes

Modified:
    commons/sandbox/runtime/trunk/build.xml
    commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h
    commons/sandbox/runtime/trunk/src/main/native/test/testcase.c

Modified: commons/sandbox/runtime/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/build.xml?rev=766234&r1=766233&r2=766234&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/build.xml (original)
+++ commons/sandbox/runtime/trunk/build.xml Sat Apr 18 06:15:46 2009
@@ -302,6 +302,7 @@
             <env key="PATH" 
path="${runtime.library.path}${path.separator}${java.library.path}"/>
             <env key="Path" 
path="${runtime.library.path}${path.separator}${java.library.path}"/>
             <jvmarg value="-Djava.library.path=${runtime.library.path}"/>
+            <jvmarg value="-Xmx256m"/>
         </java>
     </target>
 
@@ -316,6 +317,7 @@
             <env key="PATH" 
path="${runtime.library.path}${path.separator}${java.library.path}"/>
             <env key="Path" 
path="${runtime.library.path}${path.separator}${java.library.path}"/>
             <jvmarg value="-Djava.library.path=${runtime.library.path}"/>
+            <jvmarg value="-Xmx256m"/>
             <jvmarg value="-d64"/>
         </java>
     </target>
@@ -333,6 +335,7 @@
             <env key="PATH" 
path="${runtime.library.path}${path.separator}${java.library.path}"/>
             <env key="Path" 
path="${runtime.library.path}${path.separator}${java.library.path}"/>
             <jvmarg value="-Djava.library.path=${runtime.library.path}"/>
+            <jvmarg value="-Xmx256m"/>
         </java>
     </target>
     <!-- =================================================================== 
-->
@@ -348,6 +351,7 @@
             <env key="PATH" 
path="${runtime.library.path}${path.separator}${java.library.path}"/>
             <env key="Path" 
path="${runtime.library.path}${path.separator}${java.library.path}"/>
             <jvmarg value="-Djava.library.path=${runtime.library.path}"/>
+            <jvmarg value="-Xmx256m"/>
             <jvmarg value="-d64"/>
         </java>
     </target>

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h?rev=766234&r1=766233&r2=766234&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h 
(original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h Sat Apr 
18 06:15:46 2009
@@ -239,10 +239,12 @@
 typedef jlong                   jniptr;
 #define P2N(P)                  ((jlong)LLT(P))
 #define N2P(P, T)               ((T)LLT((jlong)P))
+#define I2P(P, T)               ((T)LLT((jlong)P) & 0x00000000FFFFFFFFL)
 #else
 typedef jint                    jniptr;
 #define P2N(P)                  ((jint)LLT(P))
 #define N2P(P, T)               ((T)LLT((jint)P))
+#define I2P(P, T)               ((T)LLT((jint)P))
 #endif
 
 #define IS_JOBJECT_NULL(E, O)  \

Modified: commons/sandbox/runtime/trunk/src/main/native/test/testcase.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/test/testcase.c?rev=766234&r1=766233&r2=766234&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/test/testcase.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/test/testcase.c Sat Apr 18 
06:15:46 2009
@@ -221,7 +221,7 @@
 ACR_JNI_EXPORT_DECLARE(jobject, TestPrivate, test017)(ACR_JNISTDARGS, jint d)
 {
     
-    return  ACR_PointerCreate(_E, (void *)d, callback);
+    return  ACR_PointerCreate(_E, I2P(d, void *), callback);
 }
 
 ACR_JNI_EXPORT_DECLARE(jint, TestPrivate, test018)(ACR_JNISTDARGS, jobject p)
@@ -254,7 +254,7 @@
 ACR_JNI_EXPORT_DECLARE(jobject, TestPrivate, test021)(ACR_JNISTDARGS, jint i, 
jint d)
 {
     
-    return  ACR_DescriptorCreate(_E, i, (void *)d, dcallback);
+    return  ACR_DescriptorCreate(_E, i, I2P(d, void *), dcallback);
 }
 
 ACR_JNI_EXPORT_DECLARE(jint, TestPrivate, test022)(ACR_JNISTDARGS, jobject d)
@@ -276,7 +276,7 @@
 
 ACR_JNI_EXPORT_DECLARE(jint, TestPrivate, test025)(ACR_JNISTDARGS, jobject d, 
int v)
 {
-    return ACR_DescriptorSetPtr(_E, d, (void *)v);
+    return ACR_DescriptorSetPtr(_E, d, I2P(v, void *));
 }
 
 ACR_JNI_EXPORT_DECLARE(jint, TestPrivate, test026)(ACR_JNISTDARGS, jobject d, 
int v)


Reply via email to