Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 2493321..68285b8 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -492,7 +492,7 @@
link = teedataobject_jumplink(to->dataobj);
if (link == NULL)
return NULL;
- Py_XSETREF(to->dataobj, (teedataobject *)link);
+ Py_SETREF(to->dataobj, (teedataobject *)link);
to->index = 0;
}
value = teedataobject_getitem(to->dataobj, to->index);