gh-117953: Cleanups For fix_up_extension() in import.c (gh-118192)
These are cleanups I've pulled out of gh-118116. Mostly, this change moves code around to align with some future changes and to improve clarity a little. There is one very small change in behavior: we now add the module to the per-interpreter caches after updating the global state, rather than before.
This commit is contained in:
@@ -3764,7 +3764,7 @@ _PySys_Create(PyThreadState *tstate, PyObject **sysmod_p)
|
||||
return status;
|
||||
}
|
||||
|
||||
if (_PyImport_FixupBuiltin(sysmod, "sys", modules) < 0) {
|
||||
if (_PyImport_FixupBuiltin(tstate, sysmod, "sys", modules) < 0) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user