summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/descrobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index cbf9e16..6daffc6 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -65,7 +65,7 @@ descr_check(PyDescrObject *descr, PyObject *obj, PyTypeObject *type,
*pres = (PyObject *)descr;
return 1;
}
- if (!PyObject_IsInstance(obj, (PyObject *)(descr->d_type))) {
+ if (!PyObject_TypeCheck(obj, descr->d_type)) {
PyErr_Format(PyExc_TypeError,
"descriptor '%s' for '%s' objects "
"doesn't apply to '%s' object",