[pypy-commit] pypy default: Specialize str_decode_utf_8_impl on allow_surrogates, to resolve a translation failure in pycket
rlamy
pypy.commits at gmail.com
Fri Sep 2 12:09:30 EDT 2016
Author: Ronan Lamy <ronan.lamy at 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
+ at 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))
- at specialize.argtype(6)
+ at specialize.arg(5)
def str_decode_utf_8_impl(s, size, errors, final, errorhandler,
allow_surrogates, result):
if size == 0:
More information about the pypy-commit
mailing list