[pywin32-bugs] [ pywin32-Bugs-979270 ] SetFilePointer fails with negative offset
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2004-06-24 21:03:19
|
Bugs item #979270, was opened at 2004-06-24 23:03 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=979270&group_id=78018 Category: win32 Group: None Status: Open Resolution: None Priority: 5 Submitted By: Patrick Mezard (trickos) Assigned to: Nobody/Anonymous (nobody) Summary: SetFilePointer fails with negative offset Initial Comment: I failed to make SetFilePointer work with negative offsets (using FILE_CURRENT or FILE_END) where the equivalent C call works correctly. The attached code demonstrates the problem. Running it returns: ###################### Traceback (most recent call last): File "test_win32file.py", line 34, in ? assert s==data AssertionError ###################### Making wild guess about the C++ code, I would say the routine/macro decoding or repacking the Py_LARGEINTEGER into a pair of (LONG,LONG) might mess with signed/unsigned integers. I have no debugging proof to support that claim though. I tested with the package provided with "Python 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC v.1200 32 bit (Intel)] on win32", Windows XP Pro SP1. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=979270&group_id=78018 |