[Python-checkins] Fix readline.c compiler warning. (GH-98738)
miss-islington
webhook-mailer at python.org
Wed Oct 26 19:28:49 EDT 2022
https://github.com/python/cpython/commit/5074c35c2a5659e74cd7a0e925a0d7e493ea28e1
commit: 5074c35c2a5659e74cd7a0e925a0d7e493ea28e1
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-26T16:28:40-07:00
summary:
Fix readline.c compiler warning. (GH-98738)
```
Modules/readline.c:1260:37: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
completer_word_break_characters =
^
```
(cherry picked from commit 29b391b1378577825a658b14764a8ff3e0b5c958)
Co-authored-by: Benjamin Peterson <benjamin at python.org>
files:
M Modules/readline.c
diff --git a/Modules/readline.c b/Modules/readline.c
index c79d22f85f84..1d5067209072 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -1256,9 +1256,9 @@ setup_readline(readlinestate *mod_state)
rl_attempted_completion_function = flex_complete;
/* Set Python word break characters */
completer_word_break_characters =
- rl_completer_word_break_characters =
strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
/* All nonalphanums except '.' */
+ rl_completer_word_break_characters = completer_word_break_characters;
mod_state->begidx = PyLong_FromLong(0L);
mod_state->endidx = PyLong_FromLong(0L);
More information about the Python-checkins
mailing list