Backed out changeset 952d91a7d376

If maxchar == PyUnicode_MAX_CHAR_VALUE(unicode), we do an useless copy.
This commit is contained in:
Victor Stinner 2011-10-12 00:54:35 +02:00
parent e55ad2dff0
commit 983b1434bd
1 changed files with 1 additions and 1 deletions

View File

@ -1837,7 +1837,7 @@ unicode_adjust_maxchar(PyObject **p_unicode)
}
}
}
assert(max_char <= PyUnicode_MAX_CHAR_VALUE(unicode));
assert(max_char < PyUnicode_MAX_CHAR_VALUE(unicode));
copy = PyUnicode_New(len, max_char);
copy_characters(copy, 0, unicode, 0, len);
Py_DECREF(unicode);