[pypy-svn] r73004 - pypy/branch/cpython-extension/pypy/module/cpyext
xoraxax at codespeak.net
xoraxax at codespeak.net
Sun Mar 28 00:35:00 CET 2010
Author: xoraxax
Date: Sun Mar 28 00:34:59 2010
New Revision: 73004
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/api.py
Log:
Always cast the return value in the wrapper.
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/api.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/api.py (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/api.py Sun Mar 28 00:34:59 2010
@@ -406,8 +406,8 @@
assert False, "Container not registered by %s" % (callable, )
else:
raise
- elif callable.api_func.restype is rffi.INT_real:
- retval = rffi.cast(rffi.INT_real, retval)
+ elif callable.api_func.restype is not lltype.Void:
+ retval = rffi.cast(callable.api_func.restype, retval)
return retval
wrapper.__name__ = "wrapper for %r" % (callable, )
return wrapper
More information about the Pypy-commit
mailing list