Skip to content

Commit bd44100

Browse files
fix: correctly handle str subclasses in StringIO
1 parent 62792c8 commit bd44100

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_io/stringio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ write_str(stringio *self, PyObject *obj)
225225

226226
if (self->state == STATE_ACCUMULATING) {
227227
if (self->string_size == self->pos) {
228-
if (PyUnicodeWriter_WriteStr(self->writer, decoded))
228+
if (_PyUnicodeWriter_WriteStr((_PyUnicodeWriter*)self->writer, decoded))
229229
goto fail;
230230
goto success;
231231
}

0 commit comments

Comments
 (0)