File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ struct _frame;
1515
1616#include "pycore_pystate.h" /* PyInterpreterState.eval_frame */
1717
18- PyAPI_FUNC (void ) _Py_FinishPendingCalls (struct pyruntimestate * runtime );
18+ PyAPI_FUNC (void ) _Py_FinishPendingCalls (PyThreadState * tstate );
1919PyAPI_FUNC (void ) _PyEval_Initialize (struct _ceval_runtime_state * );
2020PyAPI_FUNC (void ) _PyEval_FiniThreads (
2121 struct _ceval_runtime_state * ceval );
Original file line number Diff line number Diff line change @@ -585,11 +585,11 @@ make_pending_calls(_PyRuntimeState *runtime)
585585}
586586
587587void
588- _Py_FinishPendingCalls (_PyRuntimeState * runtime )
588+ _Py_FinishPendingCalls (PyThreadState * tstate )
589589{
590590 assert (PyGILState_Check ());
591591
592- PyThreadState * tstate = _PyRuntimeState_GetThreadState ( runtime ) ;
592+ _PyRuntimeState * runtime = tstate -> interp -> runtime ;
593593 struct _pending_calls * pending = & runtime -> ceval .pending ;
594594
595595 PyThread_acquire_lock (pending -> lock , WAIT_LOCK );
Original file line number Diff line number Diff line change @@ -1340,7 +1340,7 @@ Py_FinalizeEx(void)
13401340 wait_for_thread_shutdown (tstate );
13411341
13421342 // Make any remaining pending calls.
1343- _Py_FinishPendingCalls (runtime );
1343+ _Py_FinishPendingCalls (tstate );
13441344
13451345 /* The interpreter is still entirely intact at this point, and the
13461346 * exit funcs may be relying on that. In particular, if some thread
You can’t perform that action at this time.
0 commit comments