[Python-checkins] cpython (merge 3.5 -> default): Merge 3.5

victor.stinner python-checkins at python.org
Wed Jan 27 11:01:42 EST 2016


https://hg.python.org/cpython/rev/793dbf317f14
changeset:   100075:793dbf317f14
parent:      100073:58266f5101cc
parent:      100074:8de6f19afc86
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Jan 27 17:01:13 2016 +0100
summary:
  Merge 3.5

files:
  Objects/unicodeobject.c |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -911,6 +911,8 @@
     else if (_PyUnicode_HAS_WSTR_MEMORY(unicode)) {
         PyObject_DEL(_PyUnicode_WSTR(unicode));
         _PyUnicode_WSTR(unicode) = NULL;
+        if (!PyUnicode_IS_ASCII(unicode))
+            _PyUnicode_WSTR_LENGTH(unicode) = 0;
     }
 #ifdef Py_DEBUG
     unicode_fill_invalid(unicode, old_length);

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list