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

rlamy pypy.commits at gmail.com
Sat Oct 7 11:58:32 EDT 2017


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r92636:3f5373832c7a
Date: 2017-10-07 17:57 +0200
http://bitbucket.org/pypy/pypy/changeset/3f5373832c7a/

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
@@ -68,9 +68,10 @@
 
 def unicode_attach(space, py_obj, w_obj, w_userdata=None):
     "Fills a newly allocated PyUnicodeObject with a unicode string"
-    set_wsize(py_obj, len(space.unicode_w(w_obj)))
+    value = space.unicode_w(w_obj)
+    set_wsize(py_obj, len(value)
     set_wbuffer(py_obj, lltype.nullptr(rffi.CWCHARP.TO))
-    _readify(space, py_obj, w_obj._value)
+    _readify(space, py_obj, value)
 
 def unicode_realize(space, py_obj):
     """


More information about the pypy-commit mailing list