Skip to content

Commit 4d4c6b7

Browse files
committed
Mark test PyModuleDefs as GIL-friendly
1 parent b651cef commit 4d4c6b7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Modules/_testcapi/module.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ module_from_def_multiple_exec(PyObject *self, PyObject *spec)
278278
static PyModuleDef_Slot slots[] = {
279279
{Py_mod_exec, simple_exec},
280280
{Py_mod_exec, another_exec},
281+
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
281282
{0},
282283
};
283284
static PyModuleDef def = {

Modules/_testmultiphase.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,7 @@ PyInit__testmultiphase_exec_multiple(void)
861861
{Py_mod_exec, execfunc_a1},
862862
{Py_mod_exec, execfunc_b2},
863863
{Py_mod_exec, execfunc_c3},
864+
{Py_mod_gil, Py_MOD_GIL_NOT_USED},
864865
{0}
865866
};
866867
static PyModuleDef def = {

0 commit comments

Comments
 (0)