diff options
author | Guido van Rossum <guido@python.org> | 1997-12-10 05:51:47 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-10 05:51:47 (GMT) |
commit | d6af46d4aef833099a405c18cd3b391298bddcff (patch) | |
tree | 1a1ac347d171cfcc0aad6c7cf051a47cabee833f /Python/bltinmodule.c | |
parent | d5559576c93f33dc76dcd1dce84e79ccc2e261a8 (diff) | |
download | cpython-d6af46d4aef833099a405c18cd3b391298bddcff.zip cpython-d6af46d4aef833099a405c18cd3b391298bddcff.tar.gz cpython-d6af46d4aef833099a405c18cd3b391298bddcff.tar.bz2 |
Need a cast when comparing type object in isinstance()
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 4019559..3460f1a 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1628,7 +1628,7 @@ builtin_isinstance(self, args) if (!PyArg_ParseTuple(args, "OO", &inst, &cls)) return NULL; if (PyType_Check(cls)) { - retval = (inst->ob_type == cls); + retval = ((PyObject *)(inst->ob_type) == cls); } else { if (!PyClass_Check(cls)) { |