mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
different init for __builtins__
This commit is contained in:
parent
cd938fc5a1
commit
b4e7e25fe6
2 changed files with 4 additions and 2 deletions
|
|
@ -149,6 +149,8 @@ newframeobject(back, code, globals, locals, owner, nvalues, nblocks)
|
|||
return NULL;
|
||||
}
|
||||
builtins = dictlookup(globals, "__builtins__");
|
||||
if (builtins != NULL && is_moduleobject(builtins))
|
||||
builtins = getmoduledict(builtins);
|
||||
if (builtins == NULL || !is_mappingobject(builtins)) {
|
||||
err_setstr(TypeError, "bad __builtins__ dictionary");
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue