[pypy-svn] r77875 - pypy/branch/32ptr-on-64bit/pypy/rpython/lltypesystem
arigo at codespeak.net
arigo at codespeak.net
Wed Oct 13 16:03:30 CEST 2010
Author: arigo
Date: Wed Oct 13 16:03:28 2010
New Revision: 77875
Modified:
pypy/branch/32ptr-on-64bit/pypy/rpython/lltypesystem/ll2ctypes.py
Log:
Fix.
Modified: pypy/branch/32ptr-on-64bit/pypy/rpython/lltypesystem/ll2ctypes.py
==============================================================================
--- pypy/branch/32ptr-on-64bit/pypy/rpython/lltypesystem/ll2ctypes.py (original)
+++ pypy/branch/32ptr-on-64bit/pypy/rpython/lltypesystem/ll2ctypes.py Wed Oct 13 16:03:28 2010
@@ -1158,6 +1158,8 @@
_TYPE = llmemory.Address
def __init__(self, void_p):
+ if isinstance(void_p, _lladdress):
+ void_p = void_p.void_p
if isinstance(void_p, (int, long)):
void_p = ctypes.c_void_p(void_p)
self.void_p = void_p
@@ -1170,6 +1172,8 @@
return '<_lladdress %s>' % (self.void_p,)
def __eq__(self, other):
+ if isinstance(other, _lladdress):
+ other = other.intval
if not isinstance(other, (int, long)):
other = cast_adr_to_int(other)
return intmask(other) == self.intval
More information about the Pypy-commit
mailing list