mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
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).
This commit is contained in:
parent
56055a4749
commit
4f1b2081e9
6 changed files with 13 additions and 36 deletions
|
|
@ -427,13 +427,10 @@ setup_readline(void)
|
|||
static jmp_buf jbuf;
|
||||
|
||||
/* ARGSUSED */
|
||||
static RETSIGTYPE
|
||||
static void
|
||||
onintr(int sig)
|
||||
{
|
||||
longjmp(jbuf, 1);
|
||||
#if RETSIGTYPE != void
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -444,7 +441,7 @@ call_readline(char *prompt)
|
|||
{
|
||||
size_t n;
|
||||
char *p, *q;
|
||||
RETSIGTYPE (*old_inthandler)(int);
|
||||
void (*old_inthandler)(int);
|
||||
old_inthandler = signal(SIGINT, onintr);
|
||||
if (setjmp(jbuf)) {
|
||||
#ifdef HAVE_SIGRELSE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue