[pypy-svn] r77335 - pypy/trunk/pypy/rpython/lltypesystem

arigo at codespeak.net arigo at codespeak.net
Fri Sep 24 13:23:21 CEST 2010


Author: arigo
Date: Fri Sep 24 13:23:19 2010
New Revision: 77335

Modified:
   pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py
Log:
A fix for ctypes returning a long instead of a signed integer
in this operation.  Found by what I'm going to check in next.


Modified: pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py
==============================================================================
--- pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py	(original)
+++ pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py	Fri Sep 24 13:23:19 2010
@@ -375,7 +375,7 @@
         "Returns the storage address as an int"
         if self._storage is None or self._storage is True:
             raise ValueError("Not a ctypes allocated structure")
-        return ctypes.cast(self._storage, ctypes.c_void_p).value
+        return intmask(ctypes.cast(self._storage, ctypes.c_void_p).value)
 
     def _free(self):
         self._check()   # no double-frees



More information about the Pypy-commit mailing list