Skip to content

Commit 0465b0d

Browse files
committed
'noop', not 'trivial
1 parent fde9850 commit 0465b0d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Modules/_testcapi/module.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,19 @@ module_from_slots_methods(PyObject *self, PyObject *spec)
7777
return PyModule_FromSlotsAndSpec(slots, spec);
7878
}
7979

80-
static int trivial_traverse(PyObject *self, visitproc visit, void *arg) {
80+
static int noop_traverse(PyObject *self, visitproc visit, void *arg) {
8181
return 0;
8282
}
83-
static int trivial_clear(PyObject *self) { return 0; }
84-
static void trivial_free(void *self) { }
83+
static int noop_clear(PyObject *self) { return 0; }
84+
static void noop_free(void *self) { }
8585

8686
static PyObject *
8787
module_from_slots_gc(PyObject *self, PyObject *spec)
8888
{
8989
PyModuleDef_Slot slots[] = {
90-
{Py_mod_state_traverse, trivial_traverse},
91-
{Py_mod_state_clear, trivial_clear},
92-
{Py_mod_state_free, trivial_free},
90+
{Py_mod_state_traverse, noop_traverse},
91+
{Py_mod_state_clear, noop_clear},
92+
{Py_mod_state_free, noop_free},
9393
{0},
9494
};
9595
PyObject *mod = PyModule_FromSlotsAndSpec(slots, spec);
@@ -103,9 +103,9 @@ module_from_slots_gc(PyObject *self, PyObject *spec)
103103
Py_DECREF(mod);
104104
return NULL;
105105
}
106-
assert(traverse == &trivial_traverse);
107-
assert(clear == &trivial_clear);
108-
assert(free == &trivial_free);
106+
assert(traverse == &noop_traverse);
107+
assert(clear == &noop_clear);
108+
assert(free == &noop_free);
109109
return mod;
110110
}
111111

0 commit comments

Comments
 (0)