]> granicus.if.org Git - python/commitdiff
SF bug 601775 - some int results that should be bool.
authorGuido van Rossum <guido@python.org>
Sun, 1 Sep 2002 15:06:28 +0000 (15:06 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 1 Sep 2002 15:06:28 +0000 (15:06 +0000)
Modules/cStringIO.c
Modules/posixmodule.c

index dfab89a83bd22f75c411bddb0091b56c3eea27eb..aebdf67c3576a11e7b1a41db793bfe31422bee52 100644 (file)
@@ -133,7 +133,8 @@ IO_isatty(IOobject *self, PyObject *args) {
 
         UNLESS (PyArg_ParseTuple(args, ":isatty")) return NULL;
 
-        return PyInt_FromLong(0);
+       Py_INCREF(Py_False);
+        return Py_False;
 }
 
 PyDoc_STRVAR(IO_read__doc__,
index 0ce235a14a9add5d08e977679638263d3212f6c3..9885b1437e93dc31e7d209dd77a5ac3de55bdd77 100644 (file)
@@ -756,7 +756,7 @@ posix_access(PyObject *self, PyObject *args)
        Py_BEGIN_ALLOW_THREADS
        res = access(path, mode);
        Py_END_ALLOW_THREADS
-       return(PyInt_FromLong(res == 0 ? 1L : 0L));
+       return(PyBool_FromLong(res == 0));
 }
 
 #ifndef F_OK