• Guido van Rossum's avatar
    Band-aid solution to SF bug #470634: readlines() on linux requires 2 ^D's. · 79fd0fca
    Guido van Rossum yazdı
    The problem is that if fread() returns a short count, we attempt
    another fread() the next time through the loop, and apparently glibc
    clears or ignores the eof condition so the second fread() requires
    another ^D to make it see the eof condition.
    
    According to the man page (and the C std, I hope) fread() can only
    return a short count on error or eof.  I'm using that in the band-aid
    solution to avoid calling fread() a second time after a short read.
    
    Note that xreadlines() still has this problem: it calls
    readlines(sizehint) until it gets a zero-length return.  Since
    xreadlines() is mostly used for reading real files, I won't worry
    about this until we get a bug report.
    79fd0fca
Adı
Son kayıt (commit)
Son güncelleme
..
.cvsignore Loading commit data...
abstract.c Loading commit data...
bufferobject.c Loading commit data...
cellobject.c Loading commit data...
classobject.c Loading commit data...
cobject.c Loading commit data...
complexobject.c Loading commit data...
descrobject.c Loading commit data...
dictobject.c Loading commit data...
fileobject.c Loading commit data...
floatobject.c Loading commit data...
frameobject.c Loading commit data...
funcobject.c Loading commit data...
intobject.c Loading commit data...
iterobject.c Loading commit data...
listobject.c Loading commit data...
longobject.c Loading commit data...
methodobject.c Loading commit data...
moduleobject.c Loading commit data...
object.c Loading commit data...
obmalloc.c Loading commit data...
rangeobject.c Loading commit data...
sliceobject.c Loading commit data...
stringobject.c Loading commit data...
tupleobject.c Loading commit data...
typeobject.c Loading commit data...
unicodectype.c Loading commit data...
unicodeobject.c Loading commit data...
unicodetype_db.h Loading commit data...
weakrefobject.c Loading commit data...
xxobject.c Loading commit data...