[pypy-svn] r74399 - pypy/trunk/pypy/module/cpyext
afa at codespeak.net
afa at codespeak.net
Thu May 6 02:34:05 CEST 2010
Author: afa
Date: Thu May 6 02:34:03 2010
New Revision: 74399
Modified:
pypy/trunk/pypy/module/cpyext/api.py
Log:
Another attempt to fix translation. rtyper insist on trying to pass a
BorrowedPair to make_ref()
Modified: pypy/trunk/pypy/module/cpyext/api.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/api.py (original)
+++ pypy/trunk/pypy/module/cpyext/api.py Thu May 6 02:34:03 2010
@@ -448,12 +448,9 @@
retval = error_value
elif callable.api_func.restype is PyObject:
- if result is None:
- retval = lltype.nullptr(PyObject.TO)
- elif isinstance(result, BorrowedPair):
+ if isinstance(result, BorrowedPair):
retval = result.get_ref(space)
elif not rffi._isllptr(result):
- assert isinstance(result, W_Root)
retval = make_ref(space, result)
else:
retval = result
More information about the Pypy-commit
mailing list