Skip to content

Commit 6028e7f

Browse files
ned-deilyjcfr
authored andcommitted
Backport "Issue python#20374: Avoid compiler warnings when compiling readline with libedit."
See python/cpython@b0fd12d
1 parent 67115fc commit 6028e7f

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
@@ -735,15 +735,24 @@ on_hook(PyObject *func)
735735
return result;
736736
}
737737

738+
738739
static int
740+
#if defined(_RL_FUNCTION_TYPEDEF)
739741
on_startup_hook(void)
742+
#else
743+
on_startup_hook()
744+
#endif
740745
{
741746
return on_hook(startup_hook);
742747
}
743748

744749
#ifdef HAVE_RL_PRE_INPUT_HOOK
745750
static int
751+
#if defined(_RL_FUNCTION_TYPEDEF)
746752
on_pre_input_hook(void)
753+
#else
754+
on_pre_input_hook()
755+
#endif
747756
{
748757
return on_hook(pre_input_hook);
749758
}

0 commit comments

Comments
 (0)