diff options
author | Guido van Rossum <guido@python.org> | 2002-04-07 06:34:38 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-04-07 06:34:38 (GMT) |
commit | b8bff3f4a9e3be8b43a394d3795a46af2831fe5e (patch) | |
tree | 11e995d4ab07fcfabda980ad1c0e583f694d10e0 | |
parent | 8fdc75ba5ebf82f0cd6fa2788433d26e12b93669 (diff) | |
download | cpython-b8bff3f4a9e3be8b43a394d3795a46af2831fe5e.zip cpython-b8bff3f4a9e3be8b43a394d3795a46af2831fe5e.tar.gz cpython-b8bff3f4a9e3be8b43a394d3795a46af2831fe5e.tar.bz2 |
Return bools from functions named is_<whatever>().
-rw-r--r-- | Python/import.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/import.c b/Python/import.c index 3055f5b..11bd84e 100644 --- a/Python/import.c +++ b/Python/import.c @@ -214,9 +214,9 @@ imp_lock_held(PyObject *self, PyObject *args) 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 @@ imp_is_builtin(PyObject *self, PyObject *args) 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 @@ imp_is_frozen(PyObject *self, PyObject *args) 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 * |