summaryrefslogtreecommitdiffstats
path: root/Modules/readline.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-07-10 16:45:32 (GMT)
committerGuido van Rossum <guido@python.org>2001-07-10 16:45:32 (GMT)
commit353ae5896499d0ec297cff00e3686f4cd88668c3 (patch)
tree2d4bc47e3fc79a3c702b7ef6ff16101620341b4a /Modules/readline.c
parentd854831ddd2adbec80f38ffb26a0f355b9c8772e (diff)
downloadcpython-353ae5896499d0ec297cff00e3686f4cd88668c3.zip
cpython-353ae5896499d0ec297cff00e3686f4cd88668c3.tar.gz
cpython-353ae5896499d0ec297cff00e3686f4cd88668c3.tar.bz2
SF Patch #432457 by Jason Tishler: support for readline 4.2.
This patch allows the readline module to build cleanly with GNU readline 4.2 without breaking the build for earlier GNU readline versions. The configure script checks for the presence of rl_completion_matches in libreadline.
Diffstat (limited to 'Modules/readline.c')
-rw-r--r--Modules/readline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index 841fe02..29d8999 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -21,6 +21,10 @@
#include <readline/readline.h>
#include <readline/history.h>
+#ifdef HAVE_RL_COMPLETION_MATCHES
+#define completion_matches(x, y) rl_completion_matches((x), ((rl_compentry_func_t *)(y)))
+#endif
+
/* Pointers needed from outside (but not declared in a header file). */
extern DL_IMPORT(int) (*PyOS_InputHook)(void);
extern DL_IMPORT(char) *(*PyOS_ReadlineFunctionPointer)(char *);