From 5f55067e238c21de25f09ece9bb24ae8c42d02b4 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Wed, 16 Nov 2022 09:37:14 -0700 Subject: gh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516) https://github.com/python/cpython/issues/81057 --- Python/ceval_gil.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Python/ceval_gil.c') diff --git a/Python/ceval_gil.c b/Python/ceval_gil.c index 9b9d7dc1d1a..83f4e91e545 100644 --- a/Python/ceval_gil.c +++ b/Python/ceval_gil.c @@ -819,11 +819,10 @@ make_pending_calls(PyInterpreterState *interp) } /* don't perform recursive pending calls */ - static int busy = 0; - if (busy) { + if (interp->ceval.pending.busy) { return 0; } - busy = 1; + interp->ceval.pending.busy = 1; /* unsignal before starting to call callbacks, so that any callback added in-between re-signals */ @@ -851,11 +850,11 @@ make_pending_calls(PyInterpreterState *interp) } } - busy = 0; + interp->ceval.pending.busy = 0; return res; error: - busy = 0; + interp->ceval.pending.busy = 0; SIGNAL_PENDING_CALLS(interp); return res; } -- cgit v1.2.3