From: Barry Warsaw Date: Thu, 18 Sep 1997 16:42:02 +0000 (+0000) Subject: Py_Initialize(): move the call to _PyImport_FixupExtension() to after X-Git-Tag: v1.5a4~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=963b871e86bd85b7fb3551fa9fac5363977fc43b;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 63646161eafa..e5dc41fa93a5 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();