Commits

Philip Jenvey  committed 9b6fc11

adapt buffers' new readline to py3 (return bytes)

  • Participants
  • Parent commits 607e94c
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/module/_io/interp_bufferedio.py

         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
 
                 written += have
                 if limit >= 0:
                     limit -= have
-            return space.wrap(''.join(chunks))
+            return space.wrapbytes(''.join(chunks))
 
     # ____________________________________________________
     # Write methods