File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -3390,7 +3390,7 @@ DisableEventHook(void)
3390
3390
}
3391
3391
3392
3392
static int
3393
- module_clear (PyObject * mod )
3393
+ module_clear (PyObject * Py_UNUSED ( mod ) )
3394
3394
{
3395
3395
Py_CLEAR (Tkinter_TclError );
3396
3396
Py_CLEAR (Tkapp_Type );
@@ -3399,16 +3399,28 @@ module_clear(PyObject *mod)
3399
3399
return 0 ;
3400
3400
}
3401
3401
3402
+ static int
3403
+ module_traverse (PyObject * Py_UNUSED (module ), visitproc visit , void * arg )
3404
+ {
3405
+ Py_VISIT (Tkinter_TclError );
3406
+ Py_VISIT (Tkapp_Type );
3407
+ Py_VISIT (Tktt_Type );
3408
+ Py_VISIT (PyTclObject_Type );
3409
+ return 0 ;
3410
+ }
3411
+
3402
3412
static void
3403
3413
module_free (void * mod )
3404
3414
{
3405
- module_clear ((PyObject * )mod );
3415
+ ( void ) module_clear ((PyObject * )mod );
3406
3416
}
3407
3417
3408
3418
static struct PyModuleDef _tkintermodule = {
3409
3419
PyModuleDef_HEAD_INIT ,
3410
3420
.m_name = "_tkinter" ,
3421
+ .m_size = -1 ,
3411
3422
.m_methods = moduleMethods ,
3423
+ .m_traverse = module_traverse ,
3412
3424
.m_clear = module_clear ,
3413
3425
.m_free = module_free
3414
3426
};
You can’t perform that action at this time.
0 commit comments