summaryrefslogtreecommitdiffstats
path: root/Modules/itertoolsmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/itertoolsmodule.c')
-rw-r--r--Modules/itertoolsmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index c00c274..d545028 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -527,7 +527,7 @@ teedataobject_traverse(teedataobject *tdo, visitproc visit, void * arg)
static void
teedataobject_safe_decref(PyObject *obj)
{
- while (obj && Py_TYPE(obj) == &teedataobject_type &&
+ while (obj && Py_IS_TYPE(obj, &teedataobject_type) &&
Py_REFCNT(obj) == 1) {
PyObject *nextlink = ((teedataobject *)obj)->nextlink;
((teedataobject *)obj)->nextlink = NULL;