summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-13 17:42:56 (GMT)
committerGitHub <noreply@github.com>2023-06-13 17:42:56 (GMT)
commitc3a2cbb54d19e86f1ff402f7783d51610c2ff646 (patch)
treea79c6dc4c36c5383536224ff2e06fa5f90e1c6bb /Modules
parent9c51ea5d550dbcf5568b57913b1b453d1f92fd5c (diff)
downloadcpython-c3a2cbb54d19e86f1ff402f7783d51610c2ff646.zip
cpython-c3a2cbb54d19e86f1ff402f7783d51610c2ff646.tar.gz
cpython-c3a2cbb54d19e86f1ff402f7783d51610c2ff646.tar.bz2
[3.12] gh-105603: Change the PyInterpreterConfig.own gil Field (gh-105620) (gh-105731)
We are changing it to be more flexible that a strict bool can be for possible future expanded used cases. (cherry picked from commit b97e14a806477af4225777d215ac38c0d9b845f0) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testcapimodule.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index b8ad00a..04a8800 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -1426,7 +1426,7 @@ run_in_subinterp_with_config(PyObject *self, PyObject *args, PyObject *kwargs)
int allow_threads = -1;
int allow_daemon_threads = -1;
int check_multi_interp_extensions = -1;
- int own_gil = -1;
+ int gil = -1;
int r;
PyThreadState *substate, *mainstate;
/* only initialise 'cflags.cf_flags' to test backwards compatibility */
@@ -1439,15 +1439,15 @@ run_in_subinterp_with_config(PyObject *self, PyObject *args, PyObject *kwargs)
"allow_threads",
"allow_daemon_threads",
"check_multi_interp_extensions",
- "own_gil",
+ "gil",
NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s$ppppppp:run_in_subinterp_with_config", kwlist,
+ "s$ppppppi:run_in_subinterp_with_config", kwlist,
&code, &use_main_obmalloc,
&allow_fork, &allow_exec,
&allow_threads, &allow_daemon_threads,
&check_multi_interp_extensions,
- &own_gil)) {
+ &gil)) {
return NULL;
}
if (use_main_obmalloc < 0) {
@@ -1466,8 +1466,8 @@ run_in_subinterp_with_config(PyObject *self, PyObject *args, PyObject *kwargs)
PyErr_SetString(PyExc_ValueError, "missing allow_threads");
return NULL;
}
- if (own_gil < 0) {
- PyErr_SetString(PyExc_ValueError, "missing own_gil");
+ if (gil < 0) {
+ PyErr_SetString(PyExc_ValueError, "missing gil");
return NULL;
}
if (allow_daemon_threads < 0) {
@@ -1490,7 +1490,7 @@ run_in_subinterp_with_config(PyObject *self, PyObject *args, PyObject *kwargs)
.allow_threads = allow_threads,
.allow_daemon_threads = allow_daemon_threads,
.check_multi_interp_extensions = check_multi_interp_extensions,
- .own_gil = own_gil,
+ .gil = gil,
};
PyStatus status = Py_NewInterpreterFromConfig(&substate, &config);
if (PyStatus_Exception(status)) {