diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-01-08 04:02:07 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-01-08 04:02:07 (GMT) |
commit | 1c73323d6fb1807123ccbf56019d70d4832f9590 (patch) | |
tree | 02e718c7cb274db302f4a0975f319c7ec1947926 /Objects | |
parent | 8628206b954541e1d47fe38f4c215ebbdb16baed (diff) | |
download | cpython-1c73323d6fb1807123ccbf56019d70d4832f9590.zip cpython-1c73323d6fb1807123ccbf56019d70d4832f9590.tar.gz cpython-1c73323d6fb1807123ccbf56019d70d4832f9590.tar.bz2 |
A few reformats; no logic changes.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/fileobject.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index f13aa54..43b311e 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -639,12 +639,12 @@ Win32 MS routine to get next line. Under MSVC 6: -+ MS threadsafe getc is very slow (multiple layers of function calls - before+after each character, to lock+unlock the stream). -+ The stream-locking functions are MS-internal -- can't access them - from user code. -+ There's nothing Tim could find in the MS C or platform SDK libraries - that can worm around this. ++ MS threadsafe getc is very slow (multiple layers of function calls before+ + after each character, to lock+unlock the stream). ++ The stream-locking functions are MS-internal -- can't access them from user + code. ++ There's nothing Tim could find in the MS C or platform SDK libraries that + can worm around this. + MS fgets locks/unlocks only once per line; it's the only hook we have. So we use fgets for speed(!), despite that it's painful. @@ -731,12 +731,11 @@ ms_getline_hack(FILE *fp) } /* yuck: fgets overwrote all the newlines, i.e. the entire buffer. * So this line isn't over yet, or maybe it is but we're exactly at - *EOF; in either case, we're tired <wink>. + * EOF; in either case, we're tired <wink>. */ assert(msbuf[INITBUFSIZE-1] == '\0'); total_v_size = INITBUFSIZE + INCBUFSIZE; - v = PyString_FromStringAndSize((char*)NULL, - (int)total_v_size); + v = PyString_FromStringAndSize((char*)NULL, (int)total_v_size); if (v == NULL) return v; /* copy over everything except the last null byte */ |