]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Reads of zero should be legal!
authorGuido van Rossum <guido@python.org>
Fri, 26 Oct 1990 14:58:11 +0000 (14:58 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 26 Oct 1990 14:58:11 +0000 (14:58 +0000)
Objects/fileobject.c

index be4f3005ec9710f3dfdddf78b1a2c704d070e0bb..7eb6f5c1ee4374040572a96169f4b50380548ce0 100644 (file)
@@ -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;
        }