[pypy-commit] pypy py3.5: fix
arigo
pypy.commits at gmail.com
Tue Feb 14 11:37:12 EST 2017
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r90114:f1c5de555036
Date: 2017-02-14 17:28 +0100
http://bitbucket.org/pypy/pypy/changeset/f1c5de555036/
Log: fix
diff --git a/pypy/module/cpyext/pyfile.py b/pypy/module/cpyext/pyfile.py
--- a/pypy/module/cpyext/pyfile.py
+++ b/pypy/module/cpyext/pyfile.py
@@ -58,7 +58,7 @@
def PyFile_WriteString(space, s, w_p):
"""Write string s to file object p. Return 0 on success or -1 on
failure; the appropriate exception will be set."""
- w_str = space.wrap(rffi.charp2str(s))
+ w_str = space.newtext(rffi.charp2str(s))
space.call_method(w_p, "write", w_str)
return 0
More information about the pypy-commit
mailing list