Commit 08a28968 authored by Guido van Rossum's avatar Guido van Rossum

SF bug 601775 - some int results that should be bool.

parent 19e65c22
......@@ -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__,
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment