gh-106320: Remove private _PyInterpreterState functions (#106325)

Remove private _PyThreadState and _PyInterpreterState C API
functions: move them to the internal C API (pycore_pystate.h and
pycore_interp.h). Don't export most of these functions anymore, but
still export functions used by tests.

Remove _PyThreadState_Prealloc() and _PyThreadState_Init() from the C
API, but keep it in the stable API.
This commit is contained in:
Victor Stinner 2023-07-02 03:39:38 +02:00 committed by GitHub
parent feb51f3a64
commit 8571b271e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 86 additions and 70 deletions

View file

@ -1,7 +1,8 @@
/* Python interpreter main program for frozen scripts */
#include "Python.h"
#include "pycore_runtime.h" // _PyRuntime_Initialize()
#include "pycore_pystate.h" // _Py_GetConfig()
#include "pycore_runtime.h" // _PyRuntime_Initialize()
#include <locale.h>
#ifdef MS_WINDOWS