bpo-38644: Pass tstate explicitly in signalmodule.c (GH-19184)

PyOS_InterruptOccurred() now checks _Py_ThreadCanHandleSignals()
before checking if SIGINT is tripped.
This commit is contained in:
Victor Stinner 2020-03-26 22:28:11 +01:00 committed by GitHub
parent 08faf0016e
commit 728189884e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 96 additions and 68 deletions

View file

@ -597,8 +597,8 @@ handle_signals(PyThreadState *tstate)
}
UNSIGNAL_PENDING_SIGNALS(tstate);
if (_PyErr_CheckSignals() < 0) {
/* We're not done yet */
if (_PyErr_CheckSignalsTstate(tstate) < 0) {
/* On failure, re-schedule a call to handle_signals(). */
SIGNAL_PENDING_SIGNALS(tstate);
return -1;
}