Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 72878:2abd48a47f3b
Backed out changeset 952d91a7d376
If maxchar == PyUnicode_MAX_CHAR_VALUE(unicode), we do an useless copy.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Wed, 12 Oct 2011 00:54:35 +0200 |
| parents | 952d91a7d376 |
| children | 5b0abbdf7f1a |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Wed Oct 12 00:36:51 2011 +0200 +++ b/Objects/unicodeobject.c Wed Oct 12 00:54:35 2011 +0200 @@ -1837,7 +1837,7 @@ } } } - 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);
