[pypy-svn] r50837 - pypy/dist/pypy/rpython/lltypesystem

arigo at codespeak.net arigo at codespeak.net
Mon Jan 21 14:59:03 CET 2008


Author: arigo
Date: Mon Jan 21 14:59:02 2008
New Revision: 50837

Modified:
   pypy/dist/pypy/rpython/lltypesystem/rffi.py
Log:
Fix the "Warning: captured address may be awkward"
from the flow object space.


Modified: pypy/dist/pypy/rpython/lltypesystem/rffi.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/rffi.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/rffi.py	Mon Jan 21 14:59:02 2008
@@ -168,6 +168,7 @@
     else:
         before = None
         after = None
+    callable_name = getattr(callable, '__name__', '?')
     args = ', '.join(['a%d' % i for i in range(len(TP.TO.ARGS))])
     source = py.code.Source(r"""
         def wrapper(%s):    # no *args - no GIL for mallocing the tuple
@@ -179,7 +180,7 @@
             except Exception, e:
                 os.write(2,
                     "Warning: uncaught exception in callback: %%s %%s\n" %%
-                    (str(callable), str(e)))
+                    (callable_name, str(e)))
                 result = errorcode
             if before:
                 before()



More information about the Pypy-commit mailing list