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

When we have no setvbuf(), make the file totally unbuffered using

setbuf() if a buffer size of 0 or 1 byte is requested.
üst 22ffac1b
......@@ -165,7 +165,10 @@ PyFile_SetBufSize(f, bufsize)
}
setvbuf(((PyFileObject *)f)->f_fp, (char *)NULL,
type, bufsize);
#endif /* HAVE_SETVBUF */
#else /* !HAVE_SETVBUF */
if (bufsize <= 1)
setbuf(((PyFileObject *)f)->f_fp, (char *)NULL);
#endif /* !HAVE_SETVBUF */
}
}
......
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