Author: Armin Rigo <[email protected]>
Branch: unicode-utf8
Changeset: r93227:91d2d71881e2
Date: 2017-11-30 21:43 +0100
http://bitbucket.org/pypy/pypy/changeset/91d2d71881e2/
Log: I think this is a speed-up
diff --git a/rpython/rlib/rutf8.py b/rpython/rlib/rutf8.py
--- a/rpython/rlib/rutf8.py
+++ b/rpython/rlib/rutf8.py
@@ -86,8 +86,8 @@
"""Gives the position of the next codepoint after pos.
Assumes valid utf8. 'pos' must be before the end of the string.
"""
+ assert pos >= 0
chr1 = ord(code[pos])
- assert pos >= 0
if chr1 <= 0x7F:
return pos + 1
if chr1 <= 0xDF:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit