File tree Expand file tree Collapse file tree 2 files changed +2
-16
lines changed
Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -2304,20 +2304,13 @@ generic_dealloc(PyObject *self)
23042304 Py_DECREF (tp );
23052305}
23062306
2307- static int
2308- generic_traverse (PyObject * self , visitproc visit , void * arg )
2309- {
2310- Py_VISIT (Py_TYPE (self ));
2311- return 0 ;
2312- }
2313-
23142307static PyType_Slot generic_slots [] = {
23152308 {Py_tp_doc , (void * )generic_doc },
23162309 {Py_tp_methods , generic_methods },
23172310 {Py_tp_dealloc , generic_dealloc },
23182311 {Py_tp_alloc , PyType_GenericAlloc },
23192312 {Py_tp_free , PyObject_GC_Del },
2320- {Py_tp_traverse , generic_traverse },
2313+ {Py_tp_traverse , _PyObject_VisitType },
23212314 {0 , NULL },
23222315};
23232316
Original file line number Diff line number Diff line change @@ -161,13 +161,6 @@ PyHKEY_deallocFunc(PyObject *ob)
161161 Py_DECREF (tp );
162162}
163163
164- static int
165- PyHKEY_traverseFunc (PyObject * self , visitproc visit , void * arg )
166- {
167- Py_VISIT (Py_TYPE (self ));
168- return 0 ;
169- }
170-
171164static int
172165PyHKEY_boolFunc (PyObject * ob )
173166{
@@ -369,7 +362,7 @@ static PyType_Slot pyhkey_type_slots[] = {
369362 {Py_tp_members , PyHKEY_memberlist },
370363 {Py_tp_methods , PyHKEY_methods },
371364 {Py_tp_doc , (char * )PyHKEY_doc },
372- {Py_tp_traverse , PyHKEY_traverseFunc },
365+ {Py_tp_traverse , _PyObject_VisitType },
373366 {Py_tp_hash , PyHKEY_hashFunc },
374367 {Py_tp_str , PyHKEY_strFunc },
375368
You can’t perform that action at this time.
0 commit comments