cpython: 395e67f348e7 (original) (raw)
Mercurial > cpython
changeset 84671:395e67f348e7
Issue #18408: Fix list.extend(), handle list_resize() failure [#18408]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Tue, 16 Jul 2013 21:45:58 +0200 |
parents | f0efd7ea1627 |
children | ac4e8e6a7436 |
files | Objects/listobject.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-)[+] [-] Objects/listobject.c 6 |
line wrap: on
line diff
--- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -871,8 +871,10 @@ listextend(PyListObject self, PyObject } / Cut back result list if initial guess was too large. */
- if (Py_SIZE(self) < self->allocated)
list_resize(self, Py_SIZE(self)); /* shrinking can't fail */[](#l1.8)