[pypy-commit] pypy default: unsure to understand why I need this to make py3.5 translate
arigo
pypy.commits at gmail.com
Tue Feb 21 04:25:23 EST 2017
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r90243:dd1a88425cf6
Date: 2017-02-21 09:23 +0000
http://bitbucket.org/pypy/pypy/changeset/dd1a88425cf6/
Log: unsure to understand why I need this to make py3.5 translate
diff --git a/rpython/annotator/unaryop.py b/rpython/annotator/unaryop.py
--- a/rpython/annotator/unaryop.py
+++ b/rpython/annotator/unaryop.py
@@ -704,7 +704,8 @@
s_func = bookkeeper.immutablevalue(
runicode.unicode_encode_utf_8_elidable)
s_errors = bookkeeper.immutablevalue('strict')
- s_errorhandler = bookkeeper.immutablevalue(None)
+ s_errorhandler = bookkeeper.immutablevalue(
+ runicode.default_unicode_error_encode)
s_allow_surr = bookkeeper.immutablevalue(True)
args = [self, self.len(), s_errors, s_errorhandler, s_allow_surr]
bookkeeper.emulate_pbc_call(bookkeeper.position_key, s_func, args)
diff --git a/rpython/rtyper/rstr.py b/rpython/rtyper/rstr.py
--- a/rpython/rtyper/rstr.py
+++ b/rpython/rtyper/rstr.py
@@ -383,9 +383,10 @@
from rpython.rlib import runicode
s = hlunicode(ll_s)
assert s is not None
+ errorhandler = runicode.default_unicode_error_encode
# NB. keep the arguments in sync with annotator/unaryop.py
bytes = runicode.unicode_encode_utf_8_elidable(
- s, len(s), 'strict', None, True)
+ s, len(s), 'strict', errorhandler, True)
return self.ll.llstr(bytes)
def rtype_method_encode(self, hop):
More information about the pypy-commit
mailing list