From 292076a9aa29aba1023340a0d24252a7b27a454e Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Tue, 2 May 2023 21:40:00 -0600 Subject: 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. --- Include/cpython/initconfig.h | 2 +- Include/cpython/pylifecycle.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Include') diff --git a/Include/cpython/initconfig.h b/Include/cpython/initconfig.h index 79c1023baa..9c1783d272 100644 --- a/Include/cpython/initconfig.h +++ b/Include/cpython/initconfig.h @@ -252,7 +252,7 @@ typedef struct { int allow_threads; int allow_daemon_threads; int check_multi_interp_extensions; -} _PyInterpreterConfig; +} PyInterpreterConfig; #define _PyInterpreterConfig_INIT \ { \ diff --git a/Include/cpython/pylifecycle.h b/Include/cpython/pylifecycle.h index 79d5571131..08569ee683 100644 --- a/Include/cpython/pylifecycle.h +++ b/Include/cpython/pylifecycle.h @@ -62,9 +62,9 @@ PyAPI_FUNC(int) _Py_CoerceLegacyLocale(int warn); PyAPI_FUNC(int) _Py_LegacyLocaleDetected(int warn); PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category); -PyAPI_FUNC(PyStatus) _Py_NewInterpreterFromConfig( +PyAPI_FUNC(PyStatus) Py_NewInterpreterFromConfig( PyThreadState **tstate_p, - const _PyInterpreterConfig *config); + const PyInterpreterConfig *config); typedef void (*atexit_datacallbackfunc)(void *); PyAPI_FUNC(int) _Py_AtExit( -- cgit v1.2.1