[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>
Changeset: r47203:b96796f0767d
Date: 2011-09-11 15:49 +0200

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 @@
-        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