summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-29 02:44:38 (GMT)
committerGitHub <noreply@github.com>2023-08-29 02:44:38 (GMT)
commit21a7420190778fb6e9237bf12e029a26cd18d82d (patch)
treefdf7d9eb33b259c8e7240655a289fed551e57133 /Include/internal
parent07cf33ef24053eb101f56f0c311164b59d50157b (diff)
downloadcpython-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')
-rw-r--r--Include/internal/pycore_pystate.h8
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
}