diff options
author | Victor Stinner <vstinner@python.org> | 2023-08-29 02:44:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-29 02:44:38 (GMT) |
commit | 21a7420190778fb6e9237bf12e029a26cd18d82d (patch) | |
tree | fdf7d9eb33b259c8e7240655a289fed551e57133 /Include/internal/pycore_pystate.h | |
parent | 07cf33ef24053eb101f56f0c311164b59d50157b (diff) | |
download | cpython-21a7420190778fb6e9237bf12e029a26cd18d82d.zip cpython-21a7420190778fb6e9237bf12e029a26cd18d82d.tar.gz cpython-21a7420190778fb6e9237bf12e029a26cd18d82d.tar.bz2 |
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.
Diffstat (limited to 'Include/internal/pycore_pystate.h')
-rw-r--r-- | Include/internal/pycore_pystate.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h index 2e601cc..a30036a 100644 --- a/Include/internal/pycore_pystate.h +++ b/Include/internal/pycore_pystate.h @@ -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 } |