gh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516)

https://github.com/python/cpython/issues/81057
This commit is contained in:
Eric Snow 2022-11-16 09:37:14 -07:00 committed by GitHub
parent 5cfb7d19f5
commit 5f55067e23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 241 additions and 130 deletions

View file

@ -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;
}