summaryrefslogtreecommitdiff
path: root/Objects/listobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-11-19 12:09:00 +0100
committerVictor Stinner <victor.stinner@gmail.com>2013-11-19 12:09:00 +0100
commit3feeb3fb7fdf72151d01282c6ae176f1fe51b297 (patch)
tree0fd32f51213be70cc4dbc938528b69432ef0fea9 /Objects/listobject.c
parentc1c39389d8a80767e05f84820e28caf528ba0f81 (diff)
downloadcpython-3feeb3fb7fdf72151d01282c6ae176f1fe51b297.tar.gz
Issue #19513: Disable overallocation of the PyUnicodeWriter before the last write
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 50538e178a..45666fddfa 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -387,6 +387,7 @@ list_repr(PyListObject *v)
Py_DECREF(s);
}
+ writer.overallocate = 0;
if (_PyUnicodeWriter_WriteChar(&writer, ']') < 0)
goto error;