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;
     }