summaryrefslogtreecommitdiffstats
path: root/Modules/readline.c
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-02-06 00:53:10 (GMT)
committerNed Deily <nad@acm.org>2014-02-06 00:53:10 (GMT)
commit7b9ddea80b12fa39f38e6742166399d23c818adc (patch)
tree21b06143859d38b398e93c1939bd1a6bb8395fd3 /Modules/readline.c
parent23686074b0e665395b5b4d238663574f576cc2e3 (diff)
downloadcpython-7b9ddea80b12fa39f38e6742166399d23c818adc.zip
cpython-7b9ddea80b12fa39f38e6742166399d23c818adc.tar.gz
cpython-7b9ddea80b12fa39f38e6742166399d23c818adc.tar.bz2
Issue #20374: Avoid compiler warnings when compiling readline with libedit.
Diffstat (limited to 'Modules/readline.c')
-rw-r--r--Modules/readline.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index 4ee17a9..ae3e143 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -773,15 +773,24 @@ on_hook(PyObject *func)
return result;
}
+
static int
+#if defined(_RL_FUNCTION_TYPEDEF)
on_startup_hook(void)
+#else
+on_startup_hook()
+#endif
{
return on_hook(startup_hook);
}
#ifdef HAVE_RL_PRE_INPUT_HOOK
static int
+#if defined(_RL_FUNCTION_TYPEDEF)
on_pre_input_hook(void)
+#else
+on_pre_input_hook()
+#endif
{
return on_hook(pre_input_hook);
}