symbian-qemu-0.9.1-12/python-2.6.1/Python/sigcheck.c
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     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 }