[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-10-09 01:42:41
|
Bugs item #979270, was opened at 2004-06-25 07:03 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=979270&group_id=78018 Category: win32 Group: None >Status: Closed >Resolution: Fixed 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. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2004-10-09 11:42 Message: Logged In: YES user_id=14198 You should find this fixed in build 202 - if not, then build 203 :) I checked your test code into win32\test\test_win32file.py - thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=979270&group_id=78018 |