summaryrefslogtreecommitdiffstats
path: root/Modules/_xxsubinterpretersmodule.c
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-05-03 03:40:00 (GMT)
committerGitHub <noreply@github.com>2023-05-03 03:40:00 (GMT)
commit292076a9aa29aba1023340a0d24252a7b27a454e (patch)
tree3268355a188506819fe9399401b65d55587f9e8e /Modules/_xxsubinterpretersmodule.c
parentde64e7561680fdc5358001e9488091e75d4174a3 (diff)
downloadcpython-292076a9aa29aba1023340a0d24252a7b27a454e.zip
cpython-292076a9aa29aba1023340a0d24252a7b27a454e.tar.gz
cpython-292076a9aa29aba1023340a0d24252a7b27a454e.tar.bz2
gh-104109: Expose Py_NewInterpreterFromConfig() in the Public C-API (gh-104110)
We also expose PyInterpreterConfig. This is part of the PEP 684 (per-interpreter GIL) implementation. We will add docs as soon as we can. FYI, I'm adding the new config field for per-interpreter GIL in gh-99114.
Diffstat (limited to 'Modules/_xxsubinterpretersmodule.c')
-rw-r--r--Modules/_xxsubinterpretersmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_xxsubinterpretersmodule.c b/Modules/_xxsubinterpretersmodule.c
index 884fb0d..95273ab 100644
--- a/Modules/_xxsubinterpretersmodule.c
+++ b/Modules/_xxsubinterpretersmodule.c
@@ -513,12 +513,12 @@ interp_create(PyObject *self, PyObject *args, PyObject *kwds)
// Create and initialize the new interpreter.
PyThreadState *save_tstate = _PyThreadState_GET();
- const _PyInterpreterConfig config = isolated
- ? (_PyInterpreterConfig)_PyInterpreterConfig_INIT
- : (_PyInterpreterConfig)_PyInterpreterConfig_LEGACY_INIT;
+ const PyInterpreterConfig config = isolated
+ ? (PyInterpreterConfig)_PyInterpreterConfig_INIT
+ : (PyInterpreterConfig)_PyInterpreterConfig_LEGACY_INIT;
// XXX Possible GILState issues?
PyThreadState *tstate = NULL;
- PyStatus status = _Py_NewInterpreterFromConfig(&tstate, &config);
+ PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);
PyThreadState_Swap(save_tstate);
if (PyStatus_Exception(status)) {
/* Since no new thread state was created, there is no exception to