[issue12175] FileIO.readall() read the file position and size at each read

Antoine Pitrou report at bugs.python.org
Wed May 25 14:21:27 CEST 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> FileIO.readall() reads the file position and size before each call to
> read(), to adjust the buffer size.
> 
> Moreover FileIO.readall() calls lseek() on Windows: it should use
> _lseeki64() instead, to handle correctly file bigger than 2 GB (or
> maybe 4 GB? I don't know).
> 
> Attached patch fixes both problems.

Looks ok to me. Did you test under Windows? Did you run some benchmarks?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12175>
_______________________________________


More information about the Python-bugs-list mailing list