[pypy-svn] r75161 - pypy/trunk/pypy/module/cpyext

afa at codespeak.net afa at codespeak.net
Mon Jun 7 09:26:52 CEST 2010


Author: afa
Date: Mon Jun  7 09:26:51 2010
New Revision: 75161

Modified:
   pypy/trunk/pypy/module/cpyext/slotdefs.py
Log:
Always raise an exception when res==-1


Modified: pypy/trunk/pypy/module/cpyext/slotdefs.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/slotdefs.py	(original)
+++ pypy/trunk/pypy/module/cpyext/slotdefs.py	Mon Jun  7 09:26:51 2010
@@ -41,7 +41,7 @@
     func_init = rffi.cast(initproc, func)
     res = generic_cpy_call(space, func_init, w_self, w_args, w_kwargs)
     if rffi.cast(lltype.Signed, res) == -1:
-        space.fromcache(State).check_and_raise_exception()
+        space.fromcache(State).check_and_raise_exception(always=True)
     return None
 
 def wrap_unaryfunc(space, w_self, w_args, func):
@@ -216,7 +216,7 @@
 @cpython_api([PyObject], PyObject, external=False)
 def slot_tp_str(space, w_self):
     return space.str(w_self)
-     
+
 @cpython_api([PyObject], PyObject, external=False)
 def slot_nb_int(space, w_self):
     return space.int(w_self)



More information about the Pypy-commit mailing list