diff options
author | Brett Cannon <brett@python.org> | 2012-04-27 21:27:33 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-27 21:27:33 (GMT) |
commit | 19b409a3410605380c9fdcb2e35511c9dff53fa6 (patch) | |
tree | 03bf571ef120866dc95b8340419511ba05a33587 | |
parent | efad00d52041fedbff5d7cfadd163e228b4af519 (diff) | |
parent | 94d558b063d63eda7a898ab31b0bc2e4d0294bf1 (diff) | |
download | cpython-19b409a3410605380c9fdcb2e35511c9dff53fa6.zip cpython-19b409a3410605380c9fdcb2e35511c9dff53fa6.tar.gz cpython-19b409a3410605380c9fdcb2e35511c9dff53fa6.tar.bz2 |
merge
-rw-r--r-- | Objects/unicodeobject.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 60b0a1f..3afb799 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1985,6 +1985,9 @@ _PyUnicode_FindMaxChar(PyObject *unicode, Py_ssize_t start, Py_ssize_t end) if (start == end) return 127; + if (PyUnicode_IS_ASCII(unicode)) + return 127; + kind = PyUnicode_KIND(unicode); startptr = PyUnicode_DATA(unicode); endptr = (char *)startptr + end * kind; |