summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1997-09-18 16:42:02 +0000
committerBarry Warsaw <barry@python.org>1997-09-18 16:42:02 +0000
commit525f632f38e20f7cbd073b33a77ce3489d5ca717 (patch)
treeefc75d2ab1c22f3a9ca9847603609a40be3ab7d5 /Python/pythonrun.c
parent0ce581b61639dda7ce73f94ce5dac7c227cefe49 (diff)
downloadcpython-525f632f38e20f7cbd073b33a77ce3489d5ca717.tar.gz
Py_Initialize(): move the call to _PyImport_FixupExtension() to after
the phase 2 init of the __builtin__ module, so that multiple interpreters will get the right exceptions.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 63646161ea..e5dc41fa93 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -136,7 +136,6 @@ Py_Initialize()
Py_FatalError("Py_Initialize: can't initialize __builtin__");
interp->builtins = PyModule_GetDict(bimod);
Py_INCREF(interp->builtins);
- _PyImport_FixupExtension("__builtin__", "__builtin__");
sysmod = _PySys_Init();
if (sysmod == NULL)
@@ -150,6 +149,7 @@ Py_Initialize()
/* phase 2 of builtins */
_PyBuiltin_Init_2(interp->builtins);
+ _PyImport_FixupExtension("__builtin__", "__builtin__");
_PyImport_Init();