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