[pypy-svn] rev 580 - pypy/trunk/src/pypy/interpreter

alex at codespeak.net alex at codespeak.net
Tue May 27 17:08:35 CEST 2003


Author: alex
Date: Tue May 27 17:08:35 2003
New Revision: 580

Modified:
   pypy/trunk/src/pypy/interpreter/executioncontext.py
Log:
tried fixing inline_compile (incomplete and not really working though)



Modified: pypy/trunk/src/pypy/interpreter/executioncontext.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/executioncontext.py	(original)
+++ pypy/trunk/src/pypy/interpreter/executioncontext.py	Tue May 27 17:08:35 2003
@@ -150,13 +150,16 @@
 
 # Utilities
 
-def inlinecompile(source, symbol='exec'):
+def inlinecompile(source, space, symbol='exec'):
     """Compile the given 'source' string.
     This function differs from the built-in compile() because it abuses
     co_filename to store a copy of the complete source code.
     This lets OperationError.print_application_traceback() print the
     actual source line in the traceback."""
-    return compile(source, '<inline>\n' + source, symbol)
+    compile = space.builtin.compile
+    w = space.wrap
+    return compile(w(source), w('<inline>\n%s'%source), w(symbol), w(0), w(0))
+
 
 def offset2lineno(c, stopat):
     tab = c.co_lnotab


More information about the Pypy-commit mailing list