[pypy-svn] r73680 - in pypy/branch/decouple-host-opcodes/pypy: interpreter tool

fijal at codespeak.net fijal at codespeak.net
Mon Apr 12 22:42:46 CEST 2010


Author: fijal
Date: Mon Apr 12 22:42:44 2010
New Revision: 73680

Modified:
   pypy/branch/decouple-host-opcodes/pypy/interpreter/baseobjspace.py
   pypy/branch/decouple-host-opcodes/pypy/tool/sourcetools.py
Log:
Check in my fixes. This is still IN-PROGRESS


Modified: pypy/branch/decouple-host-opcodes/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/branch/decouple-host-opcodes/pypy/interpreter/baseobjspace.py	(original)
+++ pypy/branch/decouple-host-opcodes/pypy/interpreter/baseobjspace.py	Mon Apr 12 22:42:44 2010
@@ -957,7 +957,8 @@
         from pypy.interpreter.pycode import PyCode
         if isinstance(statement, str):
             compiler = self.createcompiler()
-            statement = compiler.compile(statement, filename, 'exec', 0)
+            statement = compiler.compile(statement, filename, 'exec', 0,
+                                         hidden_applevel=True)
         if isinstance(statement, types.CodeType):
             statement = PyCode._from_code(self, statement,
                                           hidden_applevel=hidden_applevel)

Modified: pypy/branch/decouple-host-opcodes/pypy/tool/sourcetools.py
==============================================================================
--- pypy/branch/decouple-host-opcodes/pypy/tool/sourcetools.py	(original)
+++ pypy/branch/decouple-host-opcodes/pypy/tool/sourcetools.py	Mon Apr 12 22:42:44 2010
@@ -17,7 +17,7 @@
         indentation. The shorter triple quotes are
         choosen automatically.
         The result is returned as a 1-tuple."""
-    if type(func) is not str:
+    if not isinstance(func, str):
         doc = func.__doc__
     else:
         doc = func



More information about the Pypy-commit mailing list