summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-03-06 18:28:37 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-03-06 18:28:37 (GMT)
commit2cb16aa3cb31c2c0620df3c806d10782f84c94fb (patch)
treed5e8deb858b0981767c50d3e7c2d7f3aaa8eebf4
parent68dd8ba010b13723b9cf4e4cf4899922486559f7 (diff)
downloadcpython-2cb16aa3cb31c2c0620df3c806d10782f84c94fb.zip
cpython-2cb16aa3cb31c2c0620df3c806d10782f84c94fb.tar.gz
cpython-2cb16aa3cb31c2c0620df3c806d10782f84c94fb.tar.bz2
_PyUnicode_Writer() now also reuses Unicode singletons:
empty string and latin1 single character
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
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