summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-01-27 16:01:13 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-01-27 16:01:13 (GMT)
commit5b96f17b1c30b14bd1c017504e7b6df17e1ad961 (patch)
treeadd470bd488cb777fab2a1760f7a4d59af1a354d /Objects
parent0ef0423cb2af178022991e9f3bfc276a2c3e1358 (diff)
parent5bc03a6d4d5d08663056ad1e85b67ad53e74d795 (diff)
downloadcpython-5b96f17b1c30b14bd1c017504e7b6df17e1ad961.zip
cpython-5b96f17b1c30b14bd1c017504e7b6df17e1ad961.tar.gz
cpython-5b96f17b1c30b14bd1c017504e7b6df17e1ad961.tar.bz2
Merge 3.5
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index fb79bd9..ab80e24 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -911,6 +911,8 @@ resize_compact(PyObject *unicode, Py_ssize_t length)
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);