Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2cb16aa

Browse files
committed
_PyUnicode_Writer() now also reuses Unicode singletons:
empty string and latin1 single character
1 parent 68dd8ba commit 2cb16aa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12924,7 +12924,7 @@ _PyUnicodeWriter_Finish(_PyUnicodeWriter *writer)
1292412924
writer->buffer = newbuffer;
1292512925
}
1292612926
assert(_PyUnicode_CheckConsistency(writer->buffer, 1));
12927-
return writer->buffer;
12927+
return unicode_result_ready(writer->buffer);
1292812928
}
1292912929

1293012930
void

0 commit comments

Comments
 (0)