mirror of
https://github.com/python/cpython.git
synced 2025-01-19 06:54:52 +08:00
Issue #25203: Failed readline.set_completer_delims() no longer left the
module in inconsistent state.
This commit is contained in:
commit
a6c5d53eec
@ -146,6 +146,9 @@ Core and Builtins
|
||||
Library
|
||||
-------
|
||||
|
||||
- Issue #25203: Failed readline.set_completer_delims() no longer left the
|
||||
module in inconsistent state.
|
||||
|
||||
- Issue #23329: Allow the ssl module to be built with older versions of
|
||||
LibreSSL.
|
||||
|
||||
|
@ -464,10 +464,11 @@ set_completer_delims(PyObject *self, PyObject *args)
|
||||
/* Keep a reference to the allocated memory in the module state in case
|
||||
some other module modifies rl_completer_word_break_characters
|
||||
(see issue #17289). */
|
||||
free(completer_word_break_characters);
|
||||
completer_word_break_characters = strdup(break_chars);
|
||||
if (completer_word_break_characters) {
|
||||
rl_completer_word_break_characters = completer_word_break_characters;
|
||||
break_chars = strdup(break_chars);
|
||||
if (break_chars) {
|
||||
free(completer_word_break_characters);
|
||||
completer_word_break_characters = break_chars;
|
||||
rl_completer_word_break_characters = break_chars;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user