summaryrefslogtreecommitdiffstats
path: root/Objects/descrobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/descrobject.c')
-rw-r--r--Objects/descrobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 0926817..17bdf5c 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -168,7 +168,7 @@ descr_setcheck(PyDescrObject *descr, PyObject *obj, PyObject *value,
int *pres)
{
assert(obj != NULL);
- if (!PyObject_IsInstance(obj, (PyObject *)(descr->d_type))) {
+ if (!PyObject_TypeCheck(obj, descr->d_type)) {
PyErr_Format(PyExc_TypeError,
"descriptor '%V' for '%.100s' objects "
"doesn't apply to '%.100s' object",