Kaydet (Commit) d6af46d4 authored tarafından Guido van Rossum's avatar Guido van Rossum

Need a cast when comparing type object in isinstance()

üst d5559576
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment