[pypy-commit] pypy unicode-utf8: more fixes

fijal pypy.commits at gmail.com
Fri Dec 8 06:11:05 EST 2017


Author: fijal
Branch: unicode-utf8
Changeset: r93310:e4ed73204961
Date: 2017-12-08 10:50 +0200
http://bitbucket.org/pypy/pypy/changeset/e4ed73204961/

Log:	more fixes

diff --git a/pypy/module/array/interp_array.py b/pypy/module/array/interp_array.py
--- a/pypy/module/array/interp_array.py
+++ b/pypy/module/array/interp_array.py
@@ -451,7 +451,7 @@
         """
         if self.typecode == 'u':
             buf = rffi.cast(UNICODE_ARRAY, self._buffer_as_unsigned())
-            return space.newutf8(rffi.wcharpsize2unicode(buf, self.len))
+            return space.newutf8(rffi.wcharpsize2utf8(buf, self.len), self.len)
         else:
             raise oefmt(space.w_ValueError,
                         "tounicode() may only be called on type 'u' arrays")


More information about the pypy-commit mailing list