[Patches] [ python-Patches-608182 ] Enhanced file constructor

noreply@sourceforge.net noreply@sourceforge.net
Wed, 11 Sep 2002 21:10:07 -0700


Patches item #608182, was opened at 2002-09-11 23:45
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=608182&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Taral (taral)
Assigned to: Nobody/Anonymous (nobody)
Summary: Enhanced file constructor

Initial Comment:
This patch allows the file constructor to take a file
descriptor, allowing for  much easier extension of its
functionality.

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

>Comment By: Neal Norwitz (nnorwitz)
Date: 2002-09-12 00:10

Message:
Logged In: YES 
user_id=33168

fp's and fd's are not interchangable.  The variable should
be called fd, since it's an int.  fill_file_fields() 2nd arg
is a FILE*, not an int.  So you would need to do file =
fdopen(fd, mode), then pass file as the 2nd arg.  In order
for this patch to be accepted, a test would also need to be
added (see Lib/test/test_file.py) and doc should be updated
(see Doc/lib/libfuncs.tex).

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

Comment By: Taral (taral)
Date: 2002-09-11 23:47

Message:
Logged In: YES 
user_id=25129

Bah, forgot the variable.

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

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