summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-02-06 00:52:26 (GMT)
committerNed Deily <nad@acm.org>2014-02-06 00:52:26 (GMT)
commitb0fd12d96c2bd08db7412a526dfc1eedf864a97c (patch)
treec56d2f3e6b01dfed74102220b825420238b4ee6e
parentcfc2c7bb8672e859240df093871e0ab3fb106f8c (diff)
downloadcpython-b0fd12d96c2bd08db7412a526dfc1eedf864a97c.zip
cpython-b0fd12d96c2bd08db7412a526dfc1eedf864a97c.tar.gz
cpython-b0fd12d96c2bd08db7412a526dfc1eedf864a97c.tar.bz2
Issue #20374: Avoid compiler warnings when compiling readline with libedit.
-rw-r--r--Modules/readline.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index 5d389cd..033a840 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -749,15 +749,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);
}