[issue5008] Wrong tell() result for a file opened in append mode

STINNER Victor report at bugs.python.org
Wed Jan 21 00:30:41 CET 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Patch version 2:
 - raise raise PyErr_SetFromErrno(PyExc_IOError) on lseek() error
 - add tests for unbuffered binary file and (buffered) text file

I use the type "long" to store the lseek() result, because I don't 
know if off_t is available on all OS. Py_off_t may be used, but it's 
defined above (after fileio_init). fileio_seekable() uses the 
type "int" for lseek() result, which looks worse than long :-)

Added file: http://bugs.python.org/file12818/fileio_append-2.patch

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


More information about the Python-bugs-list mailing list