Skip to content

Commit 2d8c2b2

Browse files
committed
Always define singlephase_global_update.md_gil to clean up callsite
1 parent 0271a16 commit 2d8c2b2

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

Python/import.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,9 +1679,7 @@ struct singlephase_global_update {
16791679
Py_ssize_t m_index;
16801680
PyObject *m_dict;
16811681
_Py_ext_module_origin origin;
1682-
#ifdef Py_GIL_DISABLED
16831682
void *md_gil;
1684-
#endif
16851683
};
16861684

16871685
static struct extensions_cache_value *
@@ -1740,13 +1738,7 @@ update_global_state_for_extension(PyThreadState *tstate,
17401738
#endif
17411739
cached = _extensions_cache_set(
17421740
path, name, def, m_init, singlephase->m_index, m_dict,
1743-
singlephase->origin,
1744-
#ifdef Py_GIL_DISABLED
1745-
singlephase->md_gil
1746-
#else
1747-
NULL
1748-
#endif
1749-
);
1741+
singlephase->origin, singlephase->md_gil);
17501742
if (cached == NULL) {
17511743
// XXX Ignore this error? Doing so would effectively
17521744
// mark the module as not loadable.

0 commit comments

Comments
 (0)