Kaydet (Commit) 687ef6e7 authored tarafından Guido van Rossum's avatar Guido van Rossum

On Linux, one sometimes sees spurious errors after interrupting

previous output.  Call clearerr() to prevent past errors affecting our
ferror() test later, in PyObject_Print().  Suggested by Marc Lemburg.
üst 7b7679eb
......@@ -168,6 +168,7 @@ PyObject_Print(op, fp, flags)
return -1;
}
#endif
clearerr(fp); /* Clear any previous error condition */
if (op == NULL) {
fprintf(fp, "<nil>");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment