[pypy-commit] pypy py3.5: fix translation

rlamy pypy.commits at gmail.com
Fri Sep 15 17:33:58 EDT 2017


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r92407:5ad69386dfac
Date: 2017-09-15 22:33 +0100
http://bitbucket.org/pypy/pypy/changeset/5ad69386dfac/

Log:	fix translation

diff --git a/pypy/module/cpyext/unicodeobject.py b/pypy/module/cpyext/unicodeobject.py
--- a/pypy/module/cpyext/unicodeobject.py
+++ b/pypy/module/cpyext/unicodeobject.py
@@ -313,6 +313,7 @@
 def PyUnicode_FromKindAndData(space, kind, data, size):
     if size < 0:
         raise oefmt(space.w_ValueError, "size must be positive")
+    data = cts.cast('char *', data)
     if kind == _1BYTE_KIND:
         value = rffi.charpsize2str(data, size)
         w_res = latin_1_decode(space, value, w_final=space.w_False)


More information about the pypy-commit mailing list