_Py_FinishPendingCalls() now expects a tstate argument, instead of a
runtime argument.
#include "pycore_pystate.h" /* PyInterpreterState.eval_frame */
-PyAPI_FUNC(void) _Py_FinishPendingCalls(struct pyruntimestate *runtime);
+PyAPI_FUNC(void) _Py_FinishPendingCalls(PyThreadState *tstate);
PyAPI_FUNC(void) _PyEval_Initialize(struct _ceval_runtime_state *);
PyAPI_FUNC(void) _PyEval_FiniThreads(
struct _ceval_runtime_state *ceval);
}
void
-_Py_FinishPendingCalls(_PyRuntimeState *runtime)
+_Py_FinishPendingCalls(PyThreadState *tstate)
{
assert(PyGILState_Check());
- PyThreadState *tstate = _PyRuntimeState_GetThreadState(runtime);
+ _PyRuntimeState *runtime = tstate->interp->runtime;
struct _pending_calls *pending = &runtime->ceval.pending;
PyThread_acquire_lock(pending->lock, WAIT_LOCK);
wait_for_thread_shutdown(tstate);
// Make any remaining pending calls.
- _Py_FinishPendingCalls(runtime);
+ _Py_FinishPendingCalls(tstate);
/* The interpreter is still entirely intact at this point, and the
* exit funcs may be relying on that. In particular, if some thread