Skip to content

Commit

Permalink
Always define singlephase_global_update.md_gil to clean up callsite
Browse files Browse the repository at this point in the history
  • Loading branch information
swtaarrs committed May 6, 2024
1 parent 0271a16 commit 2d8c2b2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Python/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -1679,9 +1679,7 @@ struct singlephase_global_update {
Py_ssize_t m_index;
PyObject *m_dict;
_Py_ext_module_origin origin;
#ifdef Py_GIL_DISABLED
void *md_gil;
#endif
};

static struct extensions_cache_value *
Expand Down Expand Up @@ -1740,13 +1738,7 @@ update_global_state_for_extension(PyThreadState *tstate,
#endif
cached = _extensions_cache_set(
path, name, def, m_init, singlephase->m_index, m_dict,
singlephase->origin,
#ifdef Py_GIL_DISABLED
singlephase->md_gil
#else
NULL
#endif
);
singlephase->origin, singlephase->md_gil);
if (cached == NULL) {
// XXX Ignore this error? Doing so would effectively
// mark the module as not loadable.
Expand Down

0 comments on commit 2d8c2b2

Please sign in to comment.