[pypy-svn] r11040 - pypy/dist/pypy/module/builtin

pedronis at codespeak.net pedronis at codespeak.net
Fri Apr 22 23:26:19 CEST 2005


Author: pedronis
Date: Fri Apr 22 23:26:19 2005
New Revision: 11040

Modified:
   pypy/dist/pypy/module/builtin/compiling.py
Log:
type-checking



Modified: pypy/dist/pypy/module/builtin/compiling.py
==============================================================================
--- pypy/dist/pypy/module/builtin/compiling.py	(original)
+++ pypy/dist/pypy/module/builtin/compiling.py	Fri Apr 22 23:26:19 2005
@@ -20,13 +20,13 @@
     supplied_flags |= 4096 
     if not dont_inherit:
         try:
-            frame = space.sys.call('_getframe') 
-        except OperationError, e: 
-            if not e.match(space, space.w_ValueError): 
-                raise 
-            pass
+            caller = space.getexecutioncontext().framestack.top()
+        except IndexError:
+            caller = None
         else:
-            supplied_flags |= frame.get_compile_flags()
+            from pypy.interpreter import pyframe
+            if isinstance(caller, pyframe.PyFrame): 
+                supplied_flags |= caller.get_compile_flags()
     try:
         c = cpy_builtin.compile(str_, filename, startstr, supplied_flags, 1)
     # It would be nice to propagate all exceptions to app level,



More information about the Pypy-commit mailing list