[pypy-svn] r50708 - pypy/dist/pypy/rpython/lltypesystem
arigo at codespeak.net
arigo at codespeak.net
Thu Jan 17 17:04:41 CET 2008
Author: arigo
Date: Thu Jan 17 17:04:40 2008
New Revision: 50708
Modified:
pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py
Log:
Comment.
Modified: pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py (original)
+++ pypy/dist/pypy/rpython/lltypesystem/ll2ctypes.py Thu Jan 17 17:04:40 2008
@@ -638,6 +638,8 @@
raise NotImplementedError("casting %r to %r" % (TYPE1, RESTYPE))
if isinstance(RESTYPE, lltype.Ptr):
+ # upgrade to a more recent ctypes (e.g. 1.0.2) if you get
+ # an OverflowError on the following line.
cvalue = ctypes.cast(ctypes.c_void_p(cvalue), cresulttype)
else:
cvalue = cresulttype(cvalue).value # mask high bits off if needed
More information about the Pypy-commit
mailing list