[pypy-svn] r73924 - pypy/branch/cpython-extension/pypy/module/cpyext
afa at codespeak.net
afa at codespeak.net
Wed Apr 21 00:25:27 CEST 2010
Author: afa
Date: Wed Apr 21 00:25:25 2010
New Revision: 73924
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/api.py
pypy/branch/cpython-extension/pypy/module/cpyext/slotdefs.py
Log:
More translation fixes
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 Wed Apr 21 00:25:25 2010
@@ -323,6 +323,7 @@
PyVarObjectStruct = cpython_struct("PyVarObject", PyVarObjectFields)
PyVarObject = lltype.Ptr(PyVarObjectStruct)
+ at specialize.memo()
def is_PyObject(TYPE):
if not isinstance(TYPE, lltype.Ptr):
return False
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/slotdefs.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/slotdefs.py (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/slotdefs.py Wed Apr 21 00:25:25 2010
@@ -67,7 +67,8 @@
check_num_args(space, w_args, 2)
args_w = space.fixedview(w_args)
index = space.int_w(space.index(args_w[0]))
- if generic_cpy_call(space, func_target, w_self, index, args_w[1]) == -1:
+ res = generic_cpy_call(space, func_target, w_self, index, args_w[1])
+ if rffi.cast(lltype.Signed, res) == -1:
space.fromcache(State).check_and_raise_exception()
def wrap_sq_delitem(space, w_self, w_args, func):
@@ -76,7 +77,8 @@
args_w = space.fixedview(w_args)
index = space.int_w(space.index(args_w[0]))
null = lltype.nullptr(PyObject.TO)
- if generic_cpy_call(space, func_target, w_self, index, null) == -1:
+ res = generic_cpy_call(space, func_target, w_self, index, args_w[1])
+ if rffi.cast(lltype.Signed, res) == -1:
space.fromcache(State).check_and_raise_exception(always=True)
def wrap_ssizessizeargfunc(space, w_self, w_args, func):
More information about the Pypy-commit
mailing list