mirror of
https://github.com/python/cpython.git
synced 2025-07-10 04:45:36 +00:00
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.
This commit is contained in:
parent
b01a7fa5f8
commit
963b871e86
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue