mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
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.
This commit is contained in:
parent
eba64d2afb
commit
45398ad512
5 changed files with 9 additions and 17 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue