[Patches] [ python-Patches-498109 ] fileobject truncate support for win32

noreply@sourceforge.net noreply@sourceforge.net
Tue, 01 Jan 2002 11:15:54 -0800


Patches item #498109, was opened at 2001-12-31 08:38
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=498109&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Wolfgang Strobl (strobl)
Assigned to: Tim Peters (tim_one)
Summary: fileobject truncate support for win32

Initial Comment:
python 2.2 has large file support on Windows, but 
f.truncate() throws an overflow exception when f.tell()
>2G. 

I've changed file_truncate in fileobject.c to using 
SetEndOfFile iff truncate is called without a 
parameter, on Win32.

Tested on W2k (Ger), see the diff to test_largfile.py.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-01-01 11:15

Message:
Logged In: YES 
user_id=21627

Wouldn't it be better to include a header file instead of
declaring a SetEndOfFile prototype?

----------------------------------------------------------------------

Comment By: Wolfgang Strobl (strobl)
Date: 2001-12-31 11:56

Message:
Logged In: YES 
user_id=311771

Oops. While removing some obsolete personal notes, I 
accidentally removed the leading comment.   

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-31 08:42

Message:
Logged In: YES 
user_id=6380

For Tim.

I presume the chunk of the diff that removes the leading
comment of the file is a mistake?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=498109&group_id=5470