summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-11 22:54:35 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-11 22:54:35 (GMT)
commit983b1434bda1819864fb5d82248f249358a4c22d (patch)
treef1603d49d0fa294e26ed47b305a113a811f6c0a2
parente55ad2dff05c524865c9c1767abd03deaf8f064a (diff)
downloadcpython-983b1434bda1819864fb5d82248f249358a4c22d.zip
cpython-983b1434bda1819864fb5d82248f249358a4c22d.tar.gz
cpython-983b1434bda1819864fb5d82248f249358a4c22d.tar.bz2
Backed out changeset 952d91a7d376
If maxchar == PyUnicode_MAX_CHAR_VALUE(unicode), we do an useless copy.
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 6740a75..1042254 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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);