[pypy-commit] pypy unicode-utf8-py3: return consumed, not unicode lgt
mattip
pypy.commits at gmail.com
Sun Nov 25 13:32:56 EST 2018
Author: Matti Picus <matti.picus at gmail.com>
Branch: unicode-utf8-py3
Changeset: r95365:5ff7a09cd178
Date: 2018-11-24 00:02 -0600
http://bitbucket.org/pypy/pypy/changeset/5ff7a09cd178/
Log: return consumed, not unicode lgt
diff --git a/pypy/module/_codecs/interp_codecs.py b/pypy/module/_codecs/interp_codecs.py
--- a/pypy/module/_codecs/interp_codecs.py
+++ b/pypy/module/_codecs/interp_codecs.py
@@ -754,7 +754,7 @@
res, lgt, pos = unicodehelper.str_decode_utf8(string,
errors, final, state.decode_error_handler)
return space.newtuple([space.newutf8(res, lgt),
- space.newint(lgt)])
+ space.newint(pos)])
else:
return space.newtuple([space.newutf8(string, lgt),
space.newint(len(string))])
More information about the pypy-commit
mailing list