Merge 3.5

This commit is contained in:
Victor Stinner 2016-01-27 17:01:13 +01:00
commit 5b96f17b1c
1 changed files with 2 additions and 0 deletions

View File

@ -911,6 +911,8 @@ resize_compact(PyObject *unicode, Py_ssize_t length)
else if (_PyUnicode_HAS_WSTR_MEMORY(unicode)) { else if (_PyUnicode_HAS_WSTR_MEMORY(unicode)) {
PyObject_DEL(_PyUnicode_WSTR(unicode)); PyObject_DEL(_PyUnicode_WSTR(unicode));
_PyUnicode_WSTR(unicode) = NULL; _PyUnicode_WSTR(unicode) = NULL;
if (!PyUnicode_IS_ASCII(unicode))
_PyUnicode_WSTR_LENGTH(unicode) = 0;
} }
#ifdef Py_DEBUG #ifdef Py_DEBUG
unicode_fill_invalid(unicode, old_length); unicode_fill_invalid(unicode, old_length);