Skip to content

Commit 8560260

Browse files
committed
Remove boilerplate in _dbm.
1 parent 8598eb5 commit 8560260

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Modules/_dbmmodule.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ newdbmobject(_dbm_state *state, const char *file, int flags, int mode)
9696
}
9797

9898
/* Methods */
99-
static int
100-
dbm_traverse(PyObject *dp, visitproc visit, void *arg)
101-
{
102-
Py_VISIT(Py_TYPE(dp));
103-
return 0;
104-
}
10599

106100
static void
107101
dbm_dealloc(PyObject *self)
@@ -540,7 +534,7 @@ static PyMethodDef dbm_methods[] = {
540534

541535
static PyType_Slot dbmtype_spec_slots[] = {
542536
{Py_tp_dealloc, dbm_dealloc},
543-
{Py_tp_traverse, dbm_traverse},
537+
{Py_tp_traverse, _PyObject_VisitType},
544538
{Py_tp_methods, dbm_methods},
545539
{Py_sq_contains, dbm_contains},
546540
{Py_mp_length, dbm_length},

0 commit comments

Comments
 (0)