Author: Ronan Lamy <ronan.l...@gmail.com> Branch: Changeset: r86844:d61e115b2d73 Date: 2016-09-02 17:08 +0100 http://bitbucket.org/pypy/pypy/changeset/d61e115b2d73/
Log: Specialize str_decode_utf_8_impl on allow_surrogates, to resolve a translation failure in pycket diff --git a/rpython/rlib/runicode.py b/rpython/rlib/runicode.py --- a/rpython/rlib/runicode.py +++ b/rpython/rlib/runicode.py @@ -145,6 +145,7 @@ _invalid_byte_3_of_4 = _invalid_cont_byte _invalid_byte_4_of_4 = _invalid_cont_byte +@specialize.arg(2) def _invalid_byte_2_of_3(ordch1, ordch2, allow_surrogates): return (ordch2>>6 != 0x2 or # 0b10 (ordch1 == 0xe0 and ordch2 < 0xa0) @@ -156,7 +157,7 @@ (ordch1 == 0xf0 and ordch2 < 0x90) or (ordch1 == 0xf4 and ordch2 > 0x8f)) -@specialize.argtype(6) +@specialize.arg(5) def str_decode_utf_8_impl(s, size, errors, final, errorhandler, allow_surrogates, result): if size == 0: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit