[pypy-svn] r73990 - pypy/branch/cpython-extension/pypy/module/cpyext

afa at codespeak.net afa at codespeak.net
Thu Apr 22 20:33:15 CEST 2010


Author: afa
Date: Thu Apr 22 20:33:13 2010
New Revision: 73990

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/slotdefs.py
Log:
fix inconsitency between setitem and delitem: always check the exception when -1 is returned


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	Thu Apr 22 20:33:13 2010
@@ -69,7 +69,7 @@
     index = space.int_w(space.index(args_w[0]))
     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()
+        space.fromcache(State).check_and_raise_exception(always=True)
 
 def wrap_sq_delitem(space, w_self, w_args, func):
     func_target = rffi.cast(ssizeobjargproc, func)



More information about the Pypy-commit mailing list