summaryrefslogtreecommitdiff
path: root/Include/internal/pycore_pystate.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-05-04 16:21:01 +0200
committerGitHub <noreply@github.com>2023-05-04 16:21:01 +0200
commit45398ad51220b63b8df08fb5551c6b736205daed (patch)
tree42d5b05c0706b871067d7390768493878d07eda9 /Include/internal/pycore_pystate.h
parenteba64d2afb4c429e80d863dc0dd7808bdbef30d3 (diff)
downloadcpython-git-45398ad51220b63b8df08fb5551c6b736205daed.tar.gz
gh-103323: Remove PyRuntimeState_GetThreadState() (#104171)
This function no longer makes sense, since its runtime parameter is no longer used. Use directly _PyThreadState_GET() and _PyInterpreterState_GET() instead.
Diffstat (limited to 'Include/internal/pycore_pystate.h')
-rw-r--r--Include/internal/pycore_pystate.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h
index 180ea676bc..daa40cf4bc 100644
--- a/Include/internal/pycore_pystate.h
+++ b/Include/internal/pycore_pystate.h
@@ -68,7 +68,7 @@ _Py_ThreadCanHandlePendingCalls(void)
}
-/* Variable and macro for in-line access to current thread
+/* Variable and static inline functions for in-line access to current thread
and interpreter state */
#if defined(HAVE_THREAD_LOCAL) && !defined(Py_BUILD_CORE_MODULE)
@@ -93,12 +93,6 @@ _PyThreadState_GET(void)
#endif
}
-static inline PyThreadState*
-_PyRuntimeState_GetThreadState(_PyRuntimeState *Py_UNUSED(runtime))
-{
- return _PyThreadState_GET();
-}
-
static inline void
_Py_EnsureFuncTstateNotNULL(const char *func, PyThreadState *tstate)
@@ -118,7 +112,7 @@ _Py_EnsureFuncTstateNotNULL(const char *func, PyThreadState *tstate)
/* Get the current interpreter state.
- The macro is unsafe: it does not check for error and it can return NULL.
+ The function is unsafe: it does not check for error and it can return NULL.
The caller must hold the GIL.