Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 50ee94f

Browse files
committed
is_builtin() is not a Boolean -- it can return -1, 0, 1. [SF #541652]
1 parent eee12e9 commit 50ee94f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2295,7 +2295,7 @@ imp_is_builtin(PyObject *self, PyObject *args)
22952295
char *name;
22962296
if (!PyArg_ParseTuple(args, "s:is_builtin", &name))
22972297
return NULL;
2298-
return PyBool_FromLong(is_builtin(name));
2298+
return PyInt_FromLong(is_builtin(name));
22992299
}
23002300

23012301
static PyObject *

0 commit comments

Comments
 (0)