mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
Issue #13149: Speed up append-only StringIO objects.
This is very similar to the "lazy strings" idea.
This commit is contained in:
parent
9f4b1e9c50
commit
de20b0b50e
3 changed files with 108 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue