Kaydet (Commit) a8041ae5 authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Issue #25203: Failed readline.set_completer_delims() no longer left the

 module in inconsistent state.
üst 96d2654f
...@@ -37,6 +37,9 @@ Core and Builtins ...@@ -37,6 +37,9 @@ Core and Builtins
Library Library
------- -------
- Issue #25203: Failed readline.set_completer_delims() no longer left the
module in inconsistent state.
- Issue #19143: platform module now reads Windows version from kernel32.dll to - Issue #19143: platform module now reads Windows version from kernel32.dll to
avoid compatibility shims. avoid compatibility shims.
......
...@@ -355,10 +355,11 @@ set_completer_delims(PyObject *self, PyObject *args) ...@@ -355,10 +355,11 @@ set_completer_delims(PyObject *self, PyObject *args)
/* Keep a reference to the allocated memory in the module state in case /* Keep a reference to the allocated memory in the module state in case
some other module modifies rl_completer_word_break_characters some other module modifies rl_completer_word_break_characters
(see issue #17289). */ (see issue #17289). */
free(completer_word_break_characters); break_chars = strdup(break_chars);
completer_word_break_characters = strdup(break_chars); if (break_chars) {
if (completer_word_break_characters) { free(completer_word_break_characters);
rl_completer_word_break_characters = completer_word_break_characters; completer_word_break_characters = break_chars;
rl_completer_word_break_characters = break_chars;
Py_RETURN_NONE; Py_RETURN_NONE;
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment