[pypy-commit] pypy tealet: Fix on 64-bit.

arigo noreply at buildbot.pypy.org
Wed Jul 6 20:29:04 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: tealet
Changeset: r45395:d2e14ca5f78b
Date: 2011-07-06 19:55 +0200
http://bitbucket.org/pypy/pypy/changeset/d2e14ca5f78b/

Log:	Fix on 64-bit.

diff --git a/pypy/jit/backend/llsupport/gc.py b/pypy/jit/backend/llsupport/gc.py
--- a/pypy/jit/backend/llsupport/gc.py
+++ b/pypy/jit/backend/llsupport/gc.py
@@ -356,6 +356,7 @@
     # frame is initially set to a non-negative value x, but it is
     # occasionally turned into (~x) in case of forcing.
 
+    SIGNEDARRAYPTR = rffi.CArrayPtr(lltype.Signed)
     INTARRAYPTR = rffi.CArrayPtr(rffi.INT)
     CALLSHAPES_ARRAY = rffi.CArray(INTARRAYPTR)
 
@@ -365,11 +366,11 @@
         self.force_index_ofs = gcdescr.force_index_ofs
 
     def add_jit2gc_hooks(self, jit2gc):
-        INTARRAYPTR = self.INTARRAYPTR
+        SIGNEDARRAYPTR = self.SIGNEDARRAYPTR
         def read(addr):
-            return rffi.cast(INTARRAYPTR, addr)[0]
+            return rffi.cast(SIGNEDARRAYPTR, addr)[0]
         def write(addr, newvalue):
-            rffi.cast(INTARRAYPTR, addr)[0] = newvalue
+            rffi.cast(SIGNEDARRAYPTR, addr)[0] = newvalue
         # for tests:
         read  = jit2gc.get('test_read',  read)
         write = jit2gc.get('test_write', write)


More information about the pypy-commit mailing list