Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r90837:48d983a9e92a Date: 2017-03-28 13:25 +0200 http://bitbucket.org/pypy/pypy/changeset/48d983a9e92a/
Log: uniformization diff --git a/rpython/rtyper/lltypesystem/rstr.py b/rpython/rtyper/lltypesystem/rstr.py --- a/rpython/rtyper/lltypesystem/rstr.py +++ b/rpython/rtyper/lltypesystem/rstr.py @@ -438,7 +438,7 @@ while lpos <= rpos and s.chars[lpos] == ch: lpos += 1 if right: - while lpos < rpos + 1 and s.chars[rpos] == ch: + while lpos <= rpos and s.chars[rpos] == ch: rpos -= 1 if rpos < lpos: return s.empty() @@ -459,7 +459,7 @@ while lpos <= rpos and s.chars[lpos].isspace(): lpos += 1 if right: - while lpos < rpos + 1 and s.chars[rpos].isspace(): + while lpos <= rpos and s.chars[rpos].isspace(): rpos -= 1 if rpos < lpos: return s.empty() @@ -480,7 +480,7 @@ while lpos <= rpos and LLHelpers.ll_contains(s2, s.chars[lpos]): lpos += 1 if right: - while lpos < rpos + 1 and LLHelpers.ll_contains(s2, s.chars[rpos]): + while lpos <= rpos and LLHelpers.ll_contains(s2, s.chars[rpos]): rpos -= 1 if rpos < lpos: return s.empty() _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit