summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2001-07-11 12:18:24 +0000
committerThomas Wouters <thomas@python.org>2001-07-11 12:18:24 +0000
commit958106de0494de001ff0148770b1997a9eb9ae2c (patch)
tree7a7e6642308f12751c584f5a21e6331d326be4a5 /Modules
parent800f6774be7c8b7705fa9e2a2806e458711a957c (diff)
downloadcpython-git-958106de0494de001ff0148770b1997a9eb9ae2c.tar.gz
Backport of Guido's checkins of acconfig.h (1.50), configure.in (1.224) and
readline.c (2.36), and re-generated config.h.in and configure: 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')
-rw-r--r--Modules/readline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index 841fe0219a..29d8999b5f 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 *);