2021-08-10 17:26:13 +00:00
|
|
|
#include "third_party/python/Include/Python.h"
|
2021-08-09 13:52:35 +00:00
|
|
|
/* clang-format off */
|
2021-08-08 04:08:33 +00:00
|
|
|
|
|
|
|
/* Sigcheck is similar to intrcheck() but sets an exception when an
|
|
|
|
interrupt occurs. It can't be in the intrcheck.c file since that
|
|
|
|
file (and the whole directory it is in) doesn't know about objects
|
|
|
|
or exceptions. It can't be in errors.c because it can be
|
|
|
|
overridden (at link time) by a more powerful version implemented in
|
|
|
|
signalmodule.c. */
|
|
|
|
|
2021-08-09 13:52:35 +00:00
|
|
|
#pragma weak PyErr_CheckSignals
|
|
|
|
|
2021-08-08 04:08:33 +00:00
|
|
|
/* ARGSUSED */
|
|
|
|
int
|
|
|
|
PyErr_CheckSignals(void)
|
|
|
|
{
|
|
|
|
if (!PyOS_InterruptOccurred())
|
|
|
|
return 0;
|
|
|
|
PyErr_SetNone(PyExc_KeyboardInterrupt);
|
|
|
|
return -1;
|
|
|
|
}
|