[pypy-commit] pypy default: fix rpython

fijal noreply at buildbot.pypy.org
Wed May 8 18:16:56 CEST 2013


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r63920:8b833d24ae83
Date: 2013-05-08 18:15 +0200
http://bitbucket.org/pypy/pypy/changeset/8b833d24ae83/

Log:	fix rpython

diff --git a/pypy/goal/targetpypystandalone.py b/pypy/goal/targetpypystandalone.py
--- a/pypy/goal/targetpypystandalone.py
+++ b/pypy/goal/targetpypystandalone.py
@@ -86,15 +86,20 @@
         return _pypy_execute_source(source)
 
     w_globals = space.newdict()
+    space.setitem(w_globals, space.wrap('__builtins__'),
+                  space.builtin_modules['__builtin__'])
 
     def _pypy_execute_source(source):
         try:
-            space.exec_(source, w_globals, w_globals, filename='c callback')
+            compiler = space.createcompiler()
+            stmt = compiler.compile(source, 'c callback', 'exec', 0)
+            stmt.exec_code(space, w_globals, w_globals)
         except OperationError, e:
             debug("OperationError:")
             debug(" operror-type: " + e.w_type.getname(space))
             debug(" operror-value: " + space.str_w(space.str(e.get_w_value(space))))
             return 1
+        return 0
 
     return entry_point, _pypy_execute_source # for tests
 


More information about the pypy-commit mailing list