mirror of
https://github.com/python/cpython.git
synced 2025-10-02 21:25:24 +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 (;;) {
|
for (;;) {
|
||||||
if ((c = getc(fp)) == EOF) {
|
if ((c = getc(fp)) == EOF) {
|
||||||
|
clearerr(fp);
|
||||||
if (intrcheck()) {
|
if (intrcheck()) {
|
||||||
DECREF(v);
|
DECREF(v);
|
||||||
err_set(KeyboardInterrupt);
|
err_set(KeyboardInterrupt);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue