This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, mattip, steve.dower, tim.golden, zach.ware
Date 2015-02-08.22:38:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1423435089.71.0.184594354032.issue23414@psf.upfronthosting.co.za>
In-reply-to
Content
The whence argument is used in a switch statement that handles SEEK_END and SEEK_CUR. It doesn't raise an error for an invalid whence value. It just falls through to the fsetpos call.

_portable_fseek
https://hg.python.org/cpython/file/648dcafa7e5f/Objects/fileobject.c#l692

    0:000> k 3
    Child-SP          RetAddr           Call Site
    00000000`0021fa68 00000000`1e0ac84f MSVCR90!fsetpos
    00000000`0021fa70 00000000`1e0aeea3 python27!_portable_fseek+0x6f
    00000000`0021faa0 00000000`1e0c3d09 python27!file_seek+0x123

Why does it manually handle whence and call fgetpos/fsetpos instead of calling _fseeki64?

fseek, _fseeki64
https://msdn.microsoft.com/en-us/library/75yw9bf3%28v=vs.90%29.aspx
History
Date User Action Args
2015-02-08 22:38:09eryksunsetrecipients: + eryksun, tim.golden, zach.ware, mattip, steve.dower
2015-02-08 22:38:09eryksunsetmessageid: <1423435089.71.0.184594354032.issue23414@psf.upfronthosting.co.za>
2015-02-08 22:38:09eryksunlinkissue23414 messages
2015-02-08 22:38:09eryksuncreate