[Patches] [ python-Patches-1706039 ] Added clearerr() to clear EOF state

SourceForge.net noreply at sourceforge.net
Mon Apr 23 22:22:10 CEST 2007


Patches item #1706039, was opened at 2007-04-23 13:21
Message generated for change (Comment added) made by belopolsky
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1706039&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: jos (josm)
Assigned to: Nobody/Anonymous (nobody)
Summary: Added clearerr() to clear EOF state

Initial Comment:
This patch is to fix bug 1523853.
Now file.read() works as written in the doc, which says
"An empty string is returned when EOF is encountered immediately."
Before this fix, An empty string was returned even when the last
read() encountered EOF.

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

Comment By: Alexander Belopolsky (belopolsky)
Date: 2007-04-23 16:22

Message:
Logged In: YES 
user_id=835142
Originator: NO

I was not able to reproduce the problem.  I tried to read through the end
of the file, append to the file from an external process and read again. 
It worked as expected: more data was read.

The proposed patch seems to be redundant: once ferror(f->f_fp) is known to
be 0, clearerr will do nothing and in the alternative branch clearerr is
already there. 

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

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


More information about the Patches mailing list