From: Guido van Rossum Date: Thu, 12 Jan 1995 11:37:57 +0000 (+0000) Subject: use getbuiltins() everywhere, it defaults to getbuiltidict() X-Git-Tag: v1.2b1~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94390ec2a6ea5acbea9dead528ce067c396a0301;p=thirdparty%2FPython%2Fcpython.git use getbuiltins() everywhere, it defaults to getbuiltidict() --- diff --git a/Python/ceval.c b/Python/ceval.c index 79874ef4d3ad..2d16ef8a9e9b 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -28,6 +28,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "import.h" #include "sysmodule.h" +#include "bltinmodule.h" #include "compile.h" #include "frameobject.h" #include "eval.h" @@ -1691,7 +1692,7 @@ object * getbuiltins() { if (current_frame == NULL) - return NULL; + return getbuiltindict(); else return current_frame->f_builtins; } diff --git a/Python/import.c b/Python/import.c index 1d9ea35c5bfc..302cc259daa1 100644 --- a/Python/import.c +++ b/Python/import.c @@ -149,7 +149,7 @@ exec_code_module(name, co) return NULL; d = getmoduledict(m); if (dictlookup(d, "__builtins__") == NULL) { - if (dictinsert(d, "__builtins__", getbuiltindict()) != 0) + if (dictinsert(d, "__builtins__", getbuiltins()) != 0) return NULL; } v = eval_code((codeobject *)co, d, d, d, (object *)NULL); diff --git a/Python/pythonrun.c b/Python/pythonrun.c index a25cbba848f1..11bd029a9cd3 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -100,7 +100,7 @@ initmain() fatal("can't create __main__ module"); d = getmoduledict(m); if (dictlookup(d, "__builtins__") == NULL) { - if (dictinsert(d, "__builtins__", getbuiltindict())) + if (dictinsert(d, "__builtins__", getbuiltins())) fatal("can't add __builtins__ to __main__"); } }