Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 6812:d85147dce185 legacy-trunk
Need a cast when comparing type object in isinstance()
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 10 Dec 1997 05:51:47 +0000 |
| parents | cbc5e7d6ad23 |
| children | 4030059cf97c |
line wrap: on
line diff
--- a/Python/bltinmodule.c Wed Dec 10 05:51:13 1997 +0000 +++ b/Python/bltinmodule.c Wed Dec 10 05:51:47 1997 +0000 @@ -1628,7 +1628,7 @@ 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)) {
