]> granicus.if.org Git - python/commit
Fiddled ms_getline_hack after talking w/ Guido: made clearer that the
authorTim Peters <tim.peters@gmail.com>
Mon, 8 Jan 2001 00:53:12 +0000 (00:53 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 8 Jan 2001 00:53:12 +0000 (00:53 +0000)
commit15b838521fd5952415871c8f97c4481aa391dc10
tree435c569b8818f23bf06d56b19e091b317ceca95d
parent86821b2563915e4f11cde045da8ebe01beffa634
Fiddled ms_getline_hack after talking w/ Guido:  made clearer that the
code duplication is to let us get away without a realloc whenever possible;
boosted the init buf size (the cutoff at which we *can* get away without
a realloc) from 100 to 200 so that more files can enjoy this boost; and
allowed other threads to run in all cases.  The last two cost something,
but not significantly:  in my fat test case, less than a 1% slowdown total.
Since my test case has a great many short lines, that's probably the worst
slowdown, too.  While the logic barely changed, there were lots of edits.
This also gets rid of the reference to fp->_cnt, so the last platform
assumption being made here is that fgets doesn't overwrite bytes
capriciously (== beyond the terminating null byte it must write).
Objects/fileobject.c