[Python-checkins] CVS: python/dist/src/Modules signalmodule.c,2.47,2.48
Thomas Wouters
python-dev@python.org
2000年7月22日 16:49:33 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Python dynload_aix.c,2.7,2.8 dynload_dl.c,2.4,2.5 frozenmain.c,2.23,2.24 import.c,2.142,2.143 thread_lwp.h,2.12,2.13
- Next message: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.23,2.24
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv10920
Modified Files:
signalmodule.c
Log Message:
Further ANSIfication of functionpointers and declarations. Also, make sure
to return something if RETSIGTYPE isn't void, in functions that are defined
to return RETSIGTYPE. Work around an argumentlist mismatch ('void' vs.
'void *') by using a static wrapper function.
Index: signalmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v
retrieving revision 2.47
retrieving revision 2.48
diff -C2 -r2.47 -r2.48
*** signalmodule.c 2000年07月21日 06:00:07 2.47
--- signalmodule.c 2000年07月22日 23:49:30 2.48
***************
*** 27,31 ****
#ifndef SIG_ERR
! #define SIG_ERR ((RETSIGTYPE (*)())-1)
#endif
--- 27,31 ----
#ifndef SIG_ERR
! #define SIG_ERR ((RETSIGTYPE (*)(int))-1)
#endif
***************
*** 93,97 ****
static PyObject *IntHandler;
! static RETSIGTYPE (*old_siginthandler)() = SIG_DFL;
--- 93,97 ----
static PyObject *IntHandler;
! static RETSIGTYPE (*old_siginthandler)(int) = SIG_DFL;
***************
*** 111,114 ****
--- 111,121 ----
+
+ static int
+ checksignals_witharg(void * unused)
+ {
+ return PyErr_CheckSignals();
+ }
+
static RETSIGTYPE
signal_handler(int sig_num)
***************
*** 120,125 ****
is_tripped++;
Handlers[sig_num].tripped = 1;
! Py_AddPendingCall(
! (int (*)(ANY *))PyErr_CheckSignals, NULL);
#ifdef WITH_THREAD
}
--- 127,131 ----
is_tripped++;
Handlers[sig_num].tripped = 1;
! Py_AddPendingCall(checksignals_witharg, NULL);
#ifdef WITH_THREAD
}
***************
*** 136,141 ****
#ifdef HAVE_SIGINTERRUPT
siginterrupt(sig_num, 1);
#endif
- (void)signal(sig_num, &signal_handler);
}
--- 142,150 ----
#ifdef HAVE_SIGINTERRUPT
siginterrupt(sig_num, 1);
+ #endif
+ signal(sig_num, signal_handler);
+ #if RETSIGTYPE != void
+ return 0;
#endif
}
***************
*** 192,196 ****
int sig_num;
PyObject *old_handler;
! RETSIGTYPE (*func)();
if (!PyArg_Parse(args, "(iO)", &sig_num, &obj))
return NULL;
--- 201,205 ----
int sig_num;
PyObject *old_handler;
! RETSIGTYPE (*func)(int);
if (!PyArg_Parse(args, "(iO)", &sig_num, &obj))
return NULL;
***************
*** 349,353 ****
Handlers[0].tripped = 0;
for (i = 1; i < NSIG; i++) {
! RETSIGTYPE (*t)();
#ifdef HAVE_SIGACTION
struct sigaction act;
--- 358,362 ----
Handlers[0].tripped = 0;
for (i = 1; i < NSIG; i++) {
! RETSIGTYPE (*t)(int);
#ifdef HAVE_SIGACTION
struct sigaction act;
- Previous message: [Python-checkins] CVS: python/dist/src/Python dynload_aix.c,2.7,2.8 dynload_dl.c,2.4,2.5 frozenmain.c,2.23,2.24 import.c,2.142,2.143 thread_lwp.h,2.12,2.13
- Next message: [Python-checkins] CVS: python/dist/src/Modules readline.c,2.23,2.24
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]