diff options
author | Tim Peters <tim.peters@gmail.com> | 2000-07-23 21:18:09 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2000-07-23 21:18:09 (GMT) |
commit | 4f1b2081e9dde910048ef679f5afe252023a4031 (patch) | |
tree | d0329ad8a22d260b10e05c31ca6291eb26f70b27 /Modules/signalmodule.c | |
parent | 56055a474955811fd672e406d0a175349879759d (diff) | |
download | cpython-4f1b2081e9dde910048ef679f5afe252023a4031.zip cpython-4f1b2081e9dde910048ef679f5afe252023a4031.tar.gz cpython-4f1b2081e9dde910048ef679f5afe252023a4031.tar.bz2 |
Removed all instances of RETSIGTYPE from the source code: signal
handlers "return void", according to ANSI C.
Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro.
Left RETSIGTYPE in the config stuff, because it's not clear to
me that others aren't relying on it (e.g., extension modules).
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r-- | Modules/signalmodule.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index fb525f8..f200427 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -26,7 +26,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. #include <signal.h> #ifndef SIG_ERR -#define SIG_ERR ((RETSIGTYPE (*)(int))-1) +#define SIG_ERR ((void (*)(int))-1) #endif #if defined(PYOS_OS2) @@ -92,7 +92,7 @@ static PyObject *DefaultHandler; static PyObject *IgnoreHandler; static PyObject *IntHandler; -static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL; +static void (*old_siginthandler)(int) = SIG_DFL; @@ -117,7 +117,7 @@ checksignals_witharg(void * unused) return PyErr_CheckSignals(); } -static RETSIGTYPE +static void signal_handler(int sig_num) { #ifdef WITH_THREAD @@ -136,14 +136,13 @@ signal_handler(int sig_num) reset until explicit re-instated. Don't clear the 'func' field as it is our pointer to the Python handler... */ - Py_RETURN_FROM_SIGNAL_HANDLER(0); + return; } #endif #ifdef HAVE_SIGINTERRUPT siginterrupt(sig_num, 1); #endif signal(sig_num, signal_handler); - Py_RETURN_FROM_SIGNAL_HANDLER(0); } @@ -198,7 +197,7 @@ signal_signal(PyObject *self, PyObject *args) PyObject *obj; int sig_num; PyObject *old_handler; - RETSIGTYPE (*func)(int); + void (*func)(int); if (!PyArg_Parse(args, "(iO)", &sig_num, &obj)) return NULL; #ifdef WITH_THREAD @@ -355,7 +354,7 @@ initsignal(void) Handlers[0].tripped = 0; for (i = 1; i < NSIG; i++) { - RETSIGTYPE (*t)(int); + void (*t)(int); #ifdef HAVE_SIGACTION struct sigaction act; sigaction(i, 0, &act); |