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

afa at codespeak.net afa at codespeak.net
Fri May 28 16:03:06 CEST 2010


Author: afa
Date: Fri May 28 16:03:04 2010
New Revision: 74852

Modified:
   pypy/trunk/pypy/module/cpyext/slotdefs.py
Log:
Rename stubs for missing "wrap_xxx" functions, because the translated interpreter
does not retain exception messages.

At least the RPython traceback will show the missing function instead of "wrapper_10".


Modified: pypy/trunk/pypy/module/cpyext/slotdefs.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/slotdefs.py	(original)
+++ pypy/trunk/pypy/module/cpyext/slotdefs.py	Fri May 28 16:03:04 2010
@@ -13,8 +13,7 @@
 from pypy.interpreter.error import OperationError, operationerrfmt
 from pypy.interpreter.argument import Arguments
 from pypy.rlib.unroll import unrolling_iterable
-
-space = None
+from pypy.tool.sourcetools import func_with_new_name
 
 
 def check_num_args(space, ob, n):
@@ -148,12 +147,14 @@
         if wrapper is Ellipsis:
             def wrapper(space, w_self, w_args, func, w_kwds):
                 raise NotImplementedError("Wrapper for slot " + NAME)
+            wrapper = func_with_new_name(wrapper, WRAPPER)
         wrapper1 = None
         wrapper2 = wrapper
     else:
         if wrapper is Ellipsis:
             def wrapper(space, w_self, w_args, func):
                 raise NotImplementedError("Wrapper for slot " + NAME)
+            wrapper = func_with_new_name(wrapper, WRAPPER)
         wrapper1 = wrapper
         wrapper2 = None
     return (NAME, slotname, function, wrapper1, wrapper2, DOC)



More information about the Pypy-commit mailing list