mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Need a cast when comparing type object in isinstance()
This commit is contained in:
parent
d5559576c9
commit
d6af46d4ae
1 changed files with 1 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue