diff options
author | Guido van Rossum <guido@python.org> | 1990-10-26 14:58:11 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1990-10-26 14:58:11 (GMT) |
commit | dd5c7be5680375cc33f9ec71dee7ed392e894f9c (patch) | |
tree | 1b0ccf7af295e747bb47a170a035252ec9fc344d /Objects | |
parent | 17e66f6d872b0a9d357203a67bf4434b826bc606 (diff) | |
download | cpython-dd5c7be5680375cc33f9ec71dee7ed392e894f9c.zip cpython-dd5c7be5680375cc33f9ec71dee7ed392e894f9c.tar.gz cpython-dd5c7be5680375cc33f9ec71dee7ed392e894f9c.tar.bz2 |
Reads of zero should be legal!
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/fileobject.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index be4f300..7eb6f5c 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -1,5 +1,10 @@ /* File object implementation */ +/* XXX This should become a built-in module 'io'. It should support more + functionality, better exception handling for invalid calls, etc. + It should also cooperate with posix to support popen(), which should + share most code but have a special close function. */ + #include <stdio.h> #include "PROTO.h" @@ -142,7 +147,7 @@ fileread(f, args) return NULL; } n = getintvalue(args); - if (n <= 0 /* || n > 0x7fff /*XXX*/ ) { + if (n < 0) { errno = EDOM; return NULL; } |