mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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:
parent
8227883d1f
commit
af3c1d817d
5 changed files with 163 additions and 97 deletions
|
@ -777,7 +777,7 @@ pycore_init_builtins(PyThreadState *tstate)
|
|||
}
|
||||
|
||||
PyObject *modules = _PyImport_GetModules(interp);
|
||||
if (_PyImport_FixupBuiltin(bimod, "builtins", modules) < 0) {
|
||||
if (_PyImport_FixupBuiltin(tstate, bimod, "builtins", modules) < 0) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue