Skip to content

Commit 857b4ec

Browse files
ned-deilyjcfr
authored andcommitted
Backport "Issue python#20374: Avoid compiler warnings when compiling readline with libedit."
See python/cpython@b0fd12d
1 parent 65c3afc commit 857b4ec

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Modules/readline.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,15 +747,24 @@ on_hook(PyObject *func)
747747
return result;
748748
}
749749

750+
750751
static int
752+
#if defined(_RL_FUNCTION_TYPEDEF)
751753
on_startup_hook(void)
754+
#else
755+
on_startup_hook()
756+
#endif
752757
{
753758
return on_hook(startup_hook);
754759
}
755760

756761
#ifdef HAVE_RL_PRE_INPUT_HOOK
757762
static int
763+
#if defined(_RL_FUNCTION_TYPEDEF)
758764
on_pre_input_hook(void)
765+
#else
766+
on_pre_input_hook()
767+
#endif
759768
{
760769
return on_hook(pre_input_hook);
761770
}

0 commit comments

Comments
 (0)