summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-06-13 17:08:32 (GMT)
committerGitHub <noreply@github.com>2023-06-13 17:08:32 (GMT)
commitb97e14a806477af4225777d215ac38c0d9b845f0 (patch)
tree35eb71251371258874274f6eb73ab09fe849b460 /Modules
parentabfbab6415fb029e7dca19ecc8d29a13da37bf71 (diff)
downloadcpython-b97e14a806477af4225777d215ac38c0d9b845f0.zip
cpython-b97e14a806477af4225777d215ac38c0d9b845f0.tar.gz
cpython-b97e14a806477af4225777d215ac38c0d9b845f0.tar.bz2
gh-105603: Change the PyInterpreterConfig.own gil Field (gh-105620)
We are changing it to be more flexible that a strict bool can be for possible future expanded used cases.
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 3acc757..35687b4 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)) {