Mercurial > cpython-lru_cache-weakref
diff Modules/readline.c @ 26849:bca5409b76ec legacy-trunk
Patch 659834 by Magnus Lie Hetland:
Check for readline 2.2 features. This should make it possible to
compile readline.c again with GNU readline versions 2.0 or 2.1; this
ability was removed in readline.c rev. 2.49. Apparently the older
versions are still in widespread deployment on older Solaris
installations. With an older readline, completion behavior is subtly
different (a space is always added).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 30 Dec 2002 16:25:41 +0000 |
| parents | dc4a0336a2a3 |
| children | 657aeafbbc9a |
line wrap: on
line diff
--- a/Modules/readline.c Mon Dec 30 16:21:07 2002 +0000 +++ b/Modules/readline.c Mon Dec 30 16:25:41 2002 +0000 @@ -574,7 +574,9 @@ rl_completer_word_break_characters = strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?"); /* All nonalphanums except '.' */ +#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER rl_completion_append_character ='\0'; +#endif begidx = PyInt_FromLong(0L); endidx = PyInt_FromLong(0L); @@ -626,7 +628,9 @@ if (sys_stdin != rl_instream || sys_stdout != rl_outstream) { rl_instream = sys_stdin; rl_outstream = sys_stdout; +#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER rl_prep_terminal (1); +#endif } p = readline(prompt);
