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

afa at codespeak.net afa at codespeak.net
Mon May 10 17:45:56 CEST 2010


Author: afa
Date: Mon May 10 17:45:55 2010
New Revision: 74471

Modified:
   pypy/trunk/pypy/module/cpyext/typeobject.py
Log:
Translation fix


Modified: pypy/trunk/pypy/module/cpyext/typeobject.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/typeobject.py	(original)
+++ pypy/trunk/pypy/module/cpyext/typeobject.py	Mon May 10 17:45:55 2010
@@ -297,7 +297,8 @@
     pto = rffi.cast(PyTypeObjectPtr, pyo)
     try:
         if pto.c_tp_init:
-            if generic_cpy_call(space, pto.c_tp_init, w_obj, w_args, w_kw) < 0:
+            res = generic_cpy_call(space, pto.c_tp_init, w_obj, w_args, w_kw)
+            if rffi.cast(lltype.Signed, res) < 0:
                 state = space.fromcache(State)
                 state.check_and_raise_exception()
     finally:



More information about the Pypy-commit mailing list