diff options
author | Victor Stinner <vstinner@python.org> | 2020-01-13 18:46:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-13 18:46:59 +0100 |
commit | 2b1df4592e1691017414337514c6e378eb639498 (patch) | |
tree | 3db8c91a4964ac46aad3686c80f0cdbc8493b30c /Python | |
parent | 3430c55417f59078ac397c343894a3ee82a39624 (diff) | |
download | cpython-git-2b1df4592e1691017414337514c6e378eb639498.tar.gz |
bpo-38644: Pass tstate to _Py_FinishPendingCalls() (GH-17990)
_Py_FinishPendingCalls() now expects a tstate argument, instead of a
runtime argument.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 4 | ||||
-rw-r--r-- | Python/pylifecycle.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index f780c212c5..e8931c8882 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -585,11 +585,11 @@ error: } 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); diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 1d9dff4ce8..d5d60d0a6d 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1340,7 +1340,7 @@ Py_FinalizeEx(void) 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 |