summaryrefslogtreecommitdiffstats
path: root/Modules/operator.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/operator.c')
-rw-r--r--Modules/operator.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/operator.c b/Modules/operator.c
index 53144f1..25b3999 100644
--- a/Modules/operator.c
+++ b/Modules/operator.c
@@ -358,8 +358,7 @@ itemgetter_dealloc(itemgetterobject *ig)
static int
itemgetter_traverse(itemgetterobject *ig, visitproc visit, void *arg)
{
- if (ig->item)
- return visit(ig->item, arg);
+ Py_VISIT(ig->item);
return 0;
}
@@ -497,8 +496,7 @@ attrgetter_dealloc(attrgetterobject *ag)
static int
attrgetter_traverse(attrgetterobject *ag, visitproc visit, void *arg)
{
- if (ag->attr)
- return visit(ag->attr, arg);
+ Py_VISIT(ag->attr);
return 0;
}