mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Call clearerr() after EOF seen.
This commit is contained in:
parent
c7ec9c98e2
commit
76ad8ed51d
1 changed files with 1 additions and 0 deletions
|
@ -311,6 +311,7 @@ getline(f, n)
|
|||
|
||||
for (;;) {
|
||||
if ((c = getc(fp)) == EOF) {
|
||||
clearerr(fp);
|
||||
if (intrcheck()) {
|
||||
DECREF(v);
|
||||
err_set(KeyboardInterrupt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue