Author: Armin Rigo <ar...@tunes.org> Branch: unicode-utf8-re Changeset: r93348:698fcd50ff42 Date: 2017-12-10 08:38 +0100 http://bitbucket.org/pypy/pypy/changeset/698fcd50ff42/
Log: translation fix diff --git a/pypy/module/_sre/interp_sre.py b/pypy/module/_sre/interp_sre.py --- a/pypy/module/_sre/interp_sre.py +++ b/pypy/module/_sre/interp_sre.py @@ -123,12 +123,15 @@ elif pos >= length: bytepos = len(utf8str) else: - bytepos = rutf8.codepoint_at_index(utf8str, index_storage, pos) + index_storage = w_unicode_obj._get_index_storage() + bytepos = rutf8.codepoint_position_at_index(utf8str, + index_storage, pos) if endpos >= length: endbytepos = len(utf8str) else: - endbytepos = rutf8.codepoint_at_index(utf8str, index_storage, - endpos) + index_storage = w_unicode_obj._get_index_storage() + endbytepos = rutf8.codepoint_position_at_index(utf8str, + index_storage, endpos) ctx = rsre_utf8.Utf8MatchContext( self.code, utf8str, bytepos, endbytepos, self.flags) # xxx we store the w_string on the ctx too, for _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit