Skip to content

Commit af3c1d8

Browse files
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.
1 parent 8227883 commit af3c1d8

File tree

5 files changed

+163
-97
lines changed

5 files changed

+163
-97
lines changed

Include/internal/pycore_import.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ extern int _PyImport_ReleaseLock(PyInterpreterState *interp);
2424

2525
// This is used exclusively for the sys and builtins modules:
2626
extern int _PyImport_FixupBuiltin(
27+
PyThreadState *tstate,
2728
PyObject *mod,
2829
const char *name, /* UTF-8 encoded string */
2930
PyObject *modules
3031
);
32+
// We could probably drop this:
3133
extern int _PyImport_FixupExtensionObject(PyObject*, PyObject *,
3234
PyObject *, PyObject *);
3335

0 commit comments

Comments
 (0)