From 674deb2eeaeb8358415457413502e3b5851a7010 Mon Sep 17 00:00:00 2001
From: Guido van Rossum <guido@python.org>
Date: Sun, 1 Sep 2002 15:06:28 +0000
Subject: [PATCH] SF bug 601775 - some int results that should be bool.

---
 Modules/cStringIO.c   | 3 ++-
 Modules/posixmodule.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c
index dfab89a83b..aebdf67c35 100644
--- a/Modules/cStringIO.c
+++ b/Modules/cStringIO.c
@@ -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__,
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 0ce235a14a..9885b1437e 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -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
-- 
2.50.1