diff Python/import.c @ 22866:a561ff1b4ffa legacy-trunk

Return bools from functions named is_<whatever>().
author Guido van Rossum <guido@python.org>
date Sun, 07 Apr 2002 06:34:38 +0000
parents 8703d2052339
children 15c18bc9d715
line wrap: on
line diff
--- a/Python/import.c	Sun Apr 07 06:32:21 2002 +0000
+++ b/Python/import.c	Sun Apr 07 06:34:38 2002 +0000
@@ -214,9 +214,9 @@
 	if (!PyArg_ParseTuple(args, ":lock_held"))
 		return NULL;
 #ifdef WITH_THREAD
-	return PyInt_FromLong(import_lock_thread != -1);
+	return PyBool_FromLong(import_lock_thread != -1);
 #else
-	return PyInt_FromLong(0);
+	return PyBool_FromLong(0);
 #endif
 }
 
@@ -2295,7 +2295,7 @@
 	char *name;
 	if (!PyArg_ParseTuple(args, "s:is_builtin", &name))
 		return NULL;
-	return PyInt_FromLong(is_builtin(name));
+	return PyBool_FromLong(is_builtin(name));
 }
 
 static PyObject *
@@ -2306,7 +2306,7 @@
 	if (!PyArg_ParseTuple(args, "s:is_frozen", &name))
 		return NULL;
 	p = find_frozen(name);
-	return PyInt_FromLong((long) (p == NULL ? 0 : p->size));
+	return PyBool_FromLong((long) (p == NULL ? 0 : p->size));
 }
 
 static FILE *