[pypy-commit] pypy py3k: adapt buffers' new readline to py3 (return bytes)
pjenvey
noreply at buildbot.pypy.org
Sat Feb 23 21:57:01 CET 2013
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r61706:9b6fc11644ca
Date: 2013-02-23 12:53 -0800
http://bitbucket.org/pypy/pypy/changeset/9b6fc11644ca/
Log: adapt buffers' new readline to py3 (return bytes)
diff --git a/pypy/module/_io/interp_bufferedio.py b/pypy/module/_io/interp_bufferedio.py
--- a/pypy/module/_io/interp_bufferedio.py
+++ b/pypy/module/_io/interp_bufferedio.py
@@ -659,11 +659,11 @@
else:
pos = -1
if pos >= 0:
- w_res = space.wrap(''.join(self.buffer[self.pos:pos+1]))
+ w_res = space.wrapbytes(''.join(self.buffer[self.pos:pos+1]))
self.pos = pos + 1
return w_res
if have == limit:
- w_res = space.wrap(''.join(self.buffer[self.pos:self.pos+have]))
+ w_res = space.wrapbytes(''.join(self.buffer[self.pos:self.pos+have]))
self.pos += have
return w_res
@@ -705,7 +705,7 @@
written += have
if limit >= 0:
limit -= have
- return space.wrap(''.join(chunks))
+ return space.wrapbytes(''.join(chunks))
# ____________________________________________________
# Write methods
More information about the pypy-commit
mailing list