Skip to content

Commit d7a5fd8

Browse files
committed
Remove boilerplate in _functools.
1 parent 8560260 commit d7a5fd8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Modules/_functoolsmodule.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,13 @@ placeholder_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
108108
return placeholder;
109109
}
110110

111-
static int
112-
placeholder_traverse(PyObject *self, visitproc visit, void *arg)
113-
{
114-
Py_VISIT(Py_TYPE(self));
115-
return 0;
116-
}
117-
118111
static PyType_Slot placeholder_type_slots[] = {
119112
{Py_tp_dealloc, placeholder_dealloc},
120113
{Py_tp_repr, placeholder_repr},
121114
{Py_tp_doc, (void *)placeholder_doc},
122115
{Py_tp_methods, placeholder_methods},
123116
{Py_tp_new, placeholder_new},
124-
{Py_tp_traverse, placeholder_traverse},
117+
{Py_tp_traverse, _PyObject_VisitType},
125118
{0, 0}
126119
};
127120

0 commit comments

Comments
 (0)