From 2cb16aa3cb31c2c0620df3c806d10782f84c94fb Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 6 Mar 2013 19:28:37 +0100 Subject: _PyUnicode_Writer() now also reuses Unicode singletons: empty string and latin1 single character --- Objects/unicodeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index f664922..9f269a5 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -12924,7 +12924,7 @@ _PyUnicodeWriter_Finish(_PyUnicodeWriter *writer) writer->buffer = newbuffer; } assert(_PyUnicode_CheckConsistency(writer->buffer, 1)); - return writer->buffer; + return unicode_result_ready(writer->buffer); } void -- cgit v0.12