diff options
Diffstat (limited to 'Modules/readline.c')
-rw-r--r-- | Modules/readline.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/readline.c b/Modules/readline.c index 1e10dd708b..0262135823 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -792,8 +792,7 @@ on_completion_display_matches_hook(char **matches, s = PyString_FromString(matches[i+1]); if (s == NULL) goto error; - if (PyList_SetItem(m, i, s) == -1) - goto error; + PyList_SET_ITEM(m, i, s); } r = PyObject_CallFunction(completion_display_matches_hook, |