| 1 | n/a | |
|---|
| 2 | n/a | /* Sigcheck is similar to intrcheck() but sets an exception when an |
|---|
| 3 | n/a | interrupt occurs. It can't be in the intrcheck.c file since that |
|---|
| 4 | n/a | file (and the whole directory it is in) doesn't know about objects |
|---|
| 5 | n/a | or exceptions. It can't be in errors.c because it can be |
|---|
| 6 | n/a | overridden (at link time) by a more powerful version implemented in |
|---|
| 7 | n/a | signalmodule.c. */ |
|---|
| 8 | n/a | |
|---|
| 9 | n/a | #include "Python.h" |
|---|
| 10 | n/a | |
|---|
| 11 | n/a | /* ARGSUSED */ |
|---|
| 12 | n/a | int |
|---|
| 13 | n/a | PyErr_CheckSignals(void) |
|---|
| 14 | n/a | { |
|---|
| 15 | n/a | if (!PyOS_InterruptOccurred()) |
|---|
| 16 | n/a | return 0; |
|---|
| 17 | n/a | PyErr_SetNone(PyExc_KeyboardInterrupt); |
|---|
| 18 | n/a | return -1; |
|---|
| 19 | n/a | } |
|---|