Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r57467:cd011e64a1eb
Date: 2012-09-21 23:45 +0200
http://bitbucket.org/pypy/pypy/changeset/cd011e64a1eb/

Log:    cpyext: easy fixes in structmember.py

diff --git a/pypy/module/cpyext/structmember.py 
b/pypy/module/cpyext/structmember.py
--- a/pypy/module/cpyext/structmember.py
+++ b/pypy/module/cpyext/structmember.py
@@ -6,8 +6,7 @@
 from pypy.module.cpyext.intobject import PyInt_AsLong, PyInt_AsUnsignedLong
 from pypy.module.cpyext.pyerrors import PyErr_Occurred
 from pypy.module.cpyext.pyobject import PyObject, Py_DecRef, from_ref, make_ref
-from pypy.module.cpyext.stringobject import (
-    PyString_FromString, PyString_FromStringAndSize)
+from pypy.module.cpyext.unicodeobject import PyUnicode_FromString
 from pypy.module.cpyext.floatobject import PyFloat_AsDouble
 from pypy.module.cpyext.longobject import (
     PyLong_AsLongLong, PyLong_AsUnsignedLongLong, PyLong_AsSsize_t)
@@ -60,7 +59,7 @@
             w_result = space.w_None
     elif member_type == T_STRING_INPLACE:
         result = rffi.cast(rffi.CCHARP, addr)
-        w_result = PyString_FromString(space, result)
+        w_result = PyUnicode_FromString(space, result)
     elif member_type == T_CHAR:
         result = rffi.cast(rffi.CCHARP, addr)
         w_result = space.wrap(result[0])
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to