gh-106320: Remove private _PyGILState_GetInterpreterStateUnsafe() (#108603)

The remove private _PyGILState_GetInterpreterStateUnsafe() function
from the public C API: move it the internal C API (pycore_pystate.h).
No longer export the function.
This commit is contained in:
Victor Stinner 2023-08-29 04:44:38 +02:00 committed by GitHub
parent 07cf33ef24
commit 21a7420190
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 9 deletions

View file

@ -174,6 +174,14 @@ extern int _PyOS_InterruptOccurred(PyThreadState *tstate);
// Export for test_peg_generator.
PyAPI_FUNC(const PyConfig*) _Py_GetConfig(void);
// Get the single PyInterpreterState used by this process' GILState
// implementation.
//
// This function doesn't check for error. Return NULL before _PyGILState_Init()
// is called and after _PyGILState_Fini() is called.
//
// See also PyInterpreterState_Get() and _PyInterpreterState_GET().
extern PyInterpreterState* _PyGILState_GetInterpreterStateUnsafe(void);
#ifdef __cplusplus
}