[Python-checkins] CVS: python/dist/src/Modules fpectlmodule.c,2.9,2.10 readline.c,2.24,2.25 signalmodule.c,2.50,2.51
Tim Peters
python-dev@python.org
Sun, 23 Jul 2000 14:18:11 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368/python/dist/src/Modules
Modified Files:
fpectlmodule.c readline.c signalmodule.c
Log Message:
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).
Index: fpectlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/fpectlmodule.c,v
retrieving revision 2.9
retrieving revision 2.10
diff -C2 -r2.9 -r2.10
*** fpectlmodule.c 1999/04/19 16:50:26 2.9
--- fpectlmodule.c 2000/07/23 21:18:09 2.10
***************
*** 78,82 ****
#endif
! typedef RETSIGTYPE Sigfunc(int);
static Sigfunc sigfpe_handler;
static void fpe_reset(Sigfunc *);
--- 78,82 ----
#endif
! typedef void Sigfunc(int);
static Sigfunc sigfpe_handler;
static void fpe_reset(Sigfunc *);
Index: readline.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v
retrieving revision 2.24
retrieving revision 2.25
diff -C2 -r2.24 -r2.25
*** readline.c 2000/07/22 23:51:19 2.24
--- readline.c 2000/07/23 21:18:09 2.25
***************
*** 428,438 ****
/* ARGSUSED */
! static RETSIGTYPE
onintr(int sig)
{
longjmp(jbuf, 1);
- #if RETSIGTYPE != void
- return 0;
- #endif
}
--- 428,435 ----
/* ARGSUSED */
! static void
onintr(int sig)
{
longjmp(jbuf, 1);
}
***************
*** 445,449 ****
size_t n;
char *p, *q;
! RETSIGTYPE (*old_inthandler)(int);
old_inthandler = signal(SIGINT, onintr);
if (setjmp(jbuf)) {
--- 442,446 ----
size_t n;
char *p, *q;
! void (*old_inthandler)(int);
old_inthandler = signal(SIGINT, onintr);
if (setjmp(jbuf)) {
Index: signalmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v
retrieving revision 2.50
retrieving revision 2.51
diff -C2 -r2.50 -r2.51
*** signalmodule.c 2000/07/23 18:33:52 2.50
--- signalmodule.c 2000/07/23 21:18:09 2.51
***************
*** 27,31 ****
#ifndef SIG_ERR
! #define SIG_ERR ((RETSIGTYPE (*)(int))-1)
#endif
--- 27,31 ----
#ifndef SIG_ERR
! #define SIG_ERR ((void (*)(int))-1)
#endif
***************
*** 93,97 ****
static PyObject *IntHandler;
! static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL;
--- 93,97 ----
static PyObject *IntHandler;
! static void (*old_siginthandler)(int) = SIG_DFL;
***************
*** 118,122 ****
}
! static RETSIGTYPE
signal_handler(int sig_num)
{
--- 118,122 ----
}
! static void
signal_handler(int sig_num)
{
***************
*** 137,141 ****
Don't clear the 'func' field as it is our pointer
to the Python handler... */
! Py_RETURN_FROM_SIGNAL_HANDLER(0);
}
#endif
--- 137,141 ----
Don't clear the 'func' field as it is our pointer
to the Python handler... */
! return;
}
#endif
***************
*** 144,148 ****
#endif
signal(sig_num, signal_handler);
- Py_RETURN_FROM_SIGNAL_HANDLER(0);
}
--- 144,147 ----
***************
*** 199,203 ****
int sig_num;
PyObject *old_handler;
! RETSIGTYPE (*func)(int);
if (!PyArg_Parse(args, "(iO)", &sig_num, &obj))
return NULL;
--- 198,202 ----
int sig_num;
PyObject *old_handler;
! void (*func)(int);
if (!PyArg_Parse(args, "(iO)", &sig_num, &obj))
return NULL;
***************
*** 356,360 ****
Handlers[0].tripped = 0;
for (i = 1; i < NSIG; i++) {
! RETSIGTYPE (*t)(int);
#ifdef HAVE_SIGACTION
struct sigaction act;
--- 355,359 ----
Handlers[0].tripped = 0;
for (i = 1; i < NSIG; i++) {
! void (*t)(int);
#ifdef HAVE_SIGACTION
struct sigaction act;