diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-04-21 07:29:14 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-04-21 07:29:14 (GMT) |
commit | 058b141ef77edcd8000bc169f3b9b7cc9d362ffa (patch) | |
tree | 96a5f7b157b28e2667c8ebf708cc3e27d839e645 /PC/pyconfig.h | |
parent | ea572b21f846e4b9050a7508c0d5626fc835c309 (diff) | |
download | cpython-058b141ef77edcd8000bc169f3b9b7cc9d362ffa.zip cpython-058b141ef77edcd8000bc169f3b9b7cc9d362ffa.tar.gz cpython-058b141ef77edcd8000bc169f3b9b7cc9d362ffa.tar.bz2 |
Py_UniversalNewlineFread(): Many changes.
+ Continued looping until n bytes in the buffer have been filled, not
just when n bytes have been read from the file. This repairs the
bug that f.readlines() only sucked up the first 8192 bytes of the file
on Windows when universal newlines was enabled and f was opened in
U mode (see Python-Dev -- this was the ultimate cause of the
test_inspect.py failure).
+ Changed prototye to take a char* buffer (void* doesn't make much sense).
+ Squashed size_t vs int mismatches (in particular, besides the unsigned
vs signed distinction, size_t may be larger than int).
+ Gets out under all error conditions now (it's possible for fread() to
suffer an error even if it returns a number larger than 0 -- any
"short read" is an error or EOF condition).
+ Rearranged and simplified declarations.
Diffstat (limited to 'PC/pyconfig.h')
0 files changed, 0 insertions, 0 deletions