Issue #13149: Speed up append-only StringIO objects.

This is very similar to the "lazy strings" idea.
This commit is contained in:
Antoine Pitrou 2011-11-10 21:47:38 +01:00
parent 9f4b1e9c50
commit de20b0b50e
3 changed files with 108 additions and 5 deletions

View file

@ -2055,7 +2055,7 @@ Py_UCS4*
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;
}