[Python-checkins] cpython (3.3): _PyUnicode_Writer() now also reuses Unicode singletons:
victor.stinner
python-checkins at python.org
Wed Mar 6 19:29:18 CET 2013
http://hg.python.org/cpython/rev/3dd2fa78fb89
changeset: 82517:3dd2fa78fb89
branch: 3.3
parent: 82514:2d8388759305
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Mar 06 19:28:37 2013 +0100
summary:
_PyUnicode_Writer() now also reuses Unicode singletons:
empty string and latin1 single character
files:
Objects/unicodeobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -12924,7 +12924,7 @@
writer->buffer = newbuffer;
}
assert(_PyUnicode_CheckConsistency(writer->buffer, 1));
- return writer->buffer;
+ return unicode_result_ready(writer->buffer);
}
void
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list