[pypy-svn] pypy default: Translation fix.

arigo commits-noreply at bitbucket.org
Mon Jan 31 11:25:08 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r41490:76dc3cf3b959
Date: 2011-01-30 17:06 +0100
http://bitbucket.org/pypy/pypy/changeset/76dc3cf3b959/

Log:	Translation fix.

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
@@ -31,6 +31,7 @@
 
     def resize_buffer(self, newlength):
         if len(self.buf) > newlength:
+            assert newlength >= 0
             self.buf = self.buf[:newlength]
         if len(self.buf) < newlength:
             self.buf.extend([u'\0'] * (newlength - len(self.buf)))


More information about the Pypy-commit mailing list