Author: Brian Kearns <[email protected]>
Branch: use-file-star-for-file
Changeset: r73570:27bcb64887c4
Date: 2014-09-16 17:49 -0400
http://bitbucket.org/pypy/pypy/changeset/27bcb64887c4/

Log:    use explicit asserts here

diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py
--- a/rpython/rlib/rfile.py
+++ b/rpython/rlib/rfile.py
@@ -429,7 +429,7 @@
                     raise _from_errno(IOError)
                 elif chunksize == size:
                     # we read everything in one call, try to avoid copy
-                    # (remainsize == size if chunksize == size)
+                    assert remainsize == size
                     return rffi.str_from_buffer(raw_buf, gc_buf, remainsize, 
size)
                 s.append_charpsize(raw_buf, chunksize)
                 if chunksize < remainsize and not interrupted:
@@ -568,7 +568,7 @@
                 self._skipnextlf = skipnextlf
                 if i == size:
                     # we read everything in one call, try to avoid copy
-                    # (remainsize == size if i == size)
+                    assert remainsize == size
                     return rffi.str_from_buffer(raw_buf, gc_buf, remainsize, 
size)
                 s.append_charpsize(raw_buf, i)
                 if c == ord('\n'):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to