commit | de20b0b50e7b28a8f6eba8fb7e6f18063d5709b4 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Thu Nov 10 21:47:38 2011 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Thu Nov 10 21:47:38 2011 +0100 |
tree | d5a4b350abfaf0c6f6cacfe046079caf95529753 | |
parent | 9f4b1e9c50da83b51a4b0c7ee7d7dc3ef94a0cf6 [diff] [blame] |
Issue #13149: Speed up append-only StringIO objects. This is very similar to the "lazy strings" idea.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 3f580b5..772707d 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -2055,7 +2055,7 @@ PyUnicode_AsUCS4(PyObject *string, Py_UCS4 *target, Py_ssize_t targetsize, int copy_null) { - if (target == NULL || targetsize < 1) { + if (target == NULL || targetsize < 0) { PyErr_BadInternalCall(); return NULL; }