[pypy-commit] pypy default: 'honor__builtins__' is generally False, but just in case, be safe

arigo noreply at buildbot.pypy.org
Sun Sep 11 15:52:10 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r47203:b96796f0767d
Date: 2011-09-11 15:49 +0200
http://bitbucket.org/pypy/pypy/changeset/b96796f0767d/

Log:	'honor__builtins__' is generally False, but just in case, be safe
	against corner cases in which w_globals is None.

diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -66,7 +66,7 @@
         make_sure_not_resized(self.locals_stack_w)
         check_nonneg(self.nlocals)
         #
-        if space.config.objspace.honor__builtins__:
+        if space.config.objspace.honor__builtins__ and w_globals is not None:
             self.builtin = space.builtin.pick_builtin(w_globals)
         # regular functions always have CO_OPTIMIZED and CO_NEWLOCALS.
         # class bodies only have CO_NEWLOCALS.


More information about the pypy-commit mailing list