Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r73923:85646d1d07fb
Date: 2014-10-13 19:33 +0200
http://bitbucket.org/pypy/pypy/changeset/85646d1d07fb/

Log:    corner corner case, gives a slightly less bogus result

diff --git a/rpython/rlib/streamio.py b/rpython/rlib/streamio.py
--- a/rpython/rlib/streamio.py
+++ b/rpython/rlib/streamio.py
@@ -580,11 +580,11 @@
         # But it won't depend on either on a relative forward seek.
         # Nor on a seek to the very end.
         if whence == 0 or whence == 1:
-            currentsize = len(self.buf) - self.pos
             if whence == 0:
-                difpos = offset - self.tell()
+                difpos = offset - self.tell()   # may clean up 
self.buf/self.pos
             else:
                 difpos = offset
+            currentsize = len(self.buf) - self.pos
             if -self.pos <= difpos <= currentsize:
                 self.pos += intmask(difpos)
                 return
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to