Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r95021:5a26339f55a1
Date: 2018-08-22 12:22 +0300
http://bitbucket.org/pypy/pypy/changeset/5a26339f55a1/

Log:    fix python2 version to python3 version

diff --git a/pypy/module/_multibytecodec/c_codecs.py 
b/pypy/module/_multibytecodec/c_codecs.py
--- a/pypy/module/_multibytecodec/c_codecs.py
+++ b/pypy/module/_multibytecodec/c_codecs.py
@@ -265,11 +265,8 @@
             replace = "?"
     else:
         assert errorcb
-        rets, end = errorcb(errors, namecb, reason,
+        replace, end = errorcb(errors, namecb, reason,
                             unicodedata, start, end)
-        codec = pypy_cjk_enc_getcodec(encodebuf)
-        lgt = rutf8.get_utf8_length(rets)
-        replace = encode(codec, rets, lgt, "strict", errorcb, namecb)
     with rffi.scoped_nonmovingbuffer(replace) as inbuf:
         r = pypy_cjk_enc_replace_on_error(encodebuf, inbuf, len(replace), end)
     if r == MBERR_NOMEMORY:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to