[pypy-commit] pypy virtual-arguments: backout 7bbdd564ee01

fijal noreply at buildbot.pypy.org
Fri Jul 20 10:48:13 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: virtual-arguments
Changeset: r56267:27f44c78f586
Date: 2012-07-20 10:43 +0200
http://bitbucket.org/pypy/pypy/changeset/27f44c78f586/

Log:	backout 7bbdd564ee01

diff --git a/pypy/module/_io/interp_stringio.py b/pypy/module/_io/interp_stringio.py
--- a/pypy/module/_io/interp_stringio.py
+++ b/pypy/module/_io/interp_stringio.py
@@ -113,9 +113,8 @@
     def resize_buffer(self, newlength):
         if len(self.buf) > newlength:
             self.buf = self.buf[:newlength]
-        lgt = newlength - len(self.buf)
-        if lgt > 0:
-            self.buf.extend([u'\0'] * lgt)
+        if len(self.buf) < newlength:
+            self.buf.extend([u'\0'] * (newlength - len(self.buf)))
 
     def write(self, string):
         length = len(string)


More information about the pypy-commit mailing list