summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_pystate.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-10-03 16:53:51 (GMT)
committerGitHub <noreply@github.com>2023-10-03 16:53:51 (GMT)
commitd73501602f863a54c872ce103cd3fa119e38bac9 (patch)
treedf6d23aa36d385215bb03f22fe0aacf625bbdf1e /Include/internal/pycore_pystate.h
parent6ab6040054e5ca2d3eb7833dc8bf4eb0bbaa0aac (diff)
downloadcpython-d73501602f863a54c872ce103cd3fa119e38bac9.zip
cpython-d73501602f863a54c872ce103cd3fa119e38bac9.tar.gz
cpython-d73501602f863a54c872ce103cd3fa119e38bac9.tar.bz2
gh-108867: Add PyThreadState_GetUnchecked() function (#108870)
Add PyThreadState_GetUnchecked() function: similar to PyThreadState_Get(), but don't issue a fatal error if it is NULL. The caller is responsible to check if the result is NULL. Previously, this function was private and known as _PyThreadState_UncheckedGet().
Diffstat (limited to 'Include/internal/pycore_pystate.h')
-rw-r--r--Include/internal/pycore_pystate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h
index 5f8b576..a60d949 100644
--- a/Include/internal/pycore_pystate.h
+++ b/Include/internal/pycore_pystate.h
@@ -93,7 +93,7 @@ PyAPI_FUNC(PyThreadState *) _PyThreadState_GetCurrent(void);
The caller must hold the GIL.
- See also PyThreadState_Get() and _PyThreadState_UncheckedGet(). */
+ See also PyThreadState_Get() and PyThreadState_GetUnchecked(). */
static inline PyThreadState*
_PyThreadState_GET(void)
{