summaryrefslogtreecommitdiffstats
path: root/Modules/_testmultiphase.c
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-05-05 21:11:27 (GMT)
committerGitHub <noreply@github.com>2023-05-05 21:11:27 (GMT)
commita9c6e0618f26270e2591b3d99ffeef55eea02a33 (patch)
tree81bdd175c8c3b61aa3aab02cac66a122f1372871 /Modules/_testmultiphase.c
parent1c420e138fd828895b6bd3c44ef99156e8796095 (diff)
downloadcpython-a9c6e0618f26270e2591b3d99ffeef55eea02a33.zip
cpython-a9c6e0618f26270e2591b3d99ffeef55eea02a33.tar.gz
cpython-a9c6e0618f26270e2591b3d99ffeef55eea02a33.tar.bz2
gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)
Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
Diffstat (limited to 'Modules/_testmultiphase.c')
-rw-r--r--Modules/_testmultiphase.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_testmultiphase.c b/Modules/_testmultiphase.c
index bc7d8b6..58b064b 100644
--- a/Modules/_testmultiphase.c
+++ b/Modules/_testmultiphase.c
@@ -441,6 +441,7 @@ static int execfunc(PyObject *m)
static PyModuleDef_Slot main_slots[] = {
{Py_mod_exec, execfunc},
+ {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
{0, NULL},
};
@@ -745,6 +746,7 @@ PyInit__testmultiphase_create_unreported_exception(void)
static PyModuleDef_Slot slots_nonmodule_with_exec_slots[] = {
{Py_mod_create, createfunc_nonmodule},
{Py_mod_exec, execfunc},
+ {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
{0, NULL},
};
@@ -765,6 +767,7 @@ execfunc_err(PyObject *mod)
static PyModuleDef_Slot slots_exec_err[] = {
{Py_mod_exec, execfunc_err},
+ {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
{0, NULL},
};
@@ -786,6 +789,7 @@ execfunc_raise(PyObject *spec)
static PyModuleDef_Slot slots_exec_raise[] = {
{Py_mod_exec, execfunc_raise},
+ {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
{0, NULL},
};
@@ -807,6 +811,7 @@ execfunc_unreported_exception(PyObject *mod)
static PyModuleDef_Slot slots_exec_unreported_exception[] = {
{Py_mod_exec, execfunc_unreported_exception},
+ {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
{0, NULL},
};
@@ -845,6 +850,7 @@ meth_state_access_exec(PyObject *m)
static PyModuleDef_Slot meth_state_access_slots[] = {
{Py_mod_exec, meth_state_access_exec},
+ {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
{0, NULL}
};