cpython/Objects
Tim Peters f1827cfaab SF bug 801631: file.truncate fault on windows.
file_truncate():  C doesn't define what fflush(fp) does if fp is open
for update, and the preceding I/O operation on fp was input.  On Windows,
fflush() actually changes the current file position then.  Because
Windows doesn't support ftruncate() directly, this not only caused
Python's file.truncate() to change the file position (contra our docs),
it also caused the file not to change size.

Repaired by getting the initial file position at the start, restoring
it at the end, and tossing all the complicated micro-efficiency checks
trying to avoid "provably unnecessary" seeks.  file.truncate() can't
be a frequent operation, and seeking to the current file position has
got to be cheap anyway.

Bugfix candidate.
2003-09-07 03:30:18 +00:00
..
.cvsignore
abstract.c
boolobject.c
bufferobject.c
cellobject.c
classobject.c
cobject.c Add whitespace. 2003-07-11 17:02:39 +00:00
complexobject.c Remove 'e.g.' from error message 2003-08-30 23:57:36 +00:00
descrobject.c SF patch #798467: Update docstring of has_key for bool changes 2003-09-01 22:12:08 +00:00
dictnotes.txt Add notes on use cases with paired accesses to the same key. 2003-05-28 14:10:46 +00:00
dictobject.c SF patch #798467: Update docstring of has_key for bool changes 2003-09-01 22:12:08 +00:00
enumobject.c * Beefed-up tests 2003-05-28 14:05:34 +00:00
fileobject.c SF bug 801631: file.truncate fault on windows. 2003-09-07 03:30:18 +00:00
floatobject.c SF patch 703666: Several objects don't decref tmp on failure in subtype_new 2003-06-28 20:04:25 +00:00
frameobject.c Fix silly typo in comment. 2003-08-11 16:14:06 +00:00
funcobject.c SF bug #753451: classmethod abuse --> SystemError 2003-06-18 01:13:41 +00:00
intobject.c Add a couple of decrefs to error paths. 2003-08-11 17:32:02 +00:00
iterobject.c Whitespace normalization. 2003-06-25 13:12:18 +00:00
listobject.c My last fix left n used unitialized in tha a==b case. 2003-08-15 12:06:41 +00:00
listsort.txt
longobject.c SF patch 703666: Several objects don't decref tmp on failure in subtype_new 2003-06-28 20:04:25 +00:00
methodobject.c
moduleobject.c Remove code that tried to warn about shadowing builtin names after a 2003-07-16 22:04:11 +00:00
object.c Fix for 2003-08-15 13:07:47 +00:00
obmalloc.c Whitespace normalization. 2003-06-17 15:48:11 +00:00
rangeobject.c
sliceobject.c SF bug #800796: Difference between hash() and __hash__() 2003-09-05 14:27:30 +00:00
stringobject.c SF bug #795506: Wrong handling of string format code for float values. 2003-08-27 04:55:52 +00:00
structseq.c
tupleobject.c SF bug #730296: Unexpected Changes in list Iterator 2003-05-07 01:28:47 +00:00
typeobject.c Fix for 2003-08-15 13:07:47 +00:00
unicodectype.c
unicodeobject.c SF bug #795506: Wrong handling of string format code for float values. 2003-08-27 04:55:52 +00:00
unicodetype_db.h
weakrefobject.c Remove proxy_print(), since that caused an inconsistency between 2003-07-14 21:46:23 +00:00