From 673541988813e728bc5a69fc4f5490069d09af87 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 23 Jun 2025 13:26:49 +0300 Subject: [PATCH 1/2] gh-135839: Fix `traverse_module_state` usage in `_interpchannelsmodule` --- Modules/_interpchannelsmodule.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/_interpchannelsmodule.c b/Modules/_interpchannelsmodule.c index ee5e2b005e0a5b..2d8c5878cdaa84 100644 --- a/Modules/_interpchannelsmodule.c +++ b/Modules/_interpchannelsmodule.c @@ -3614,8 +3614,7 @@ module_traverse(PyObject *mod, visitproc visit, void *arg) { module_state *state = get_module_state(mod); assert(state != NULL); - (void)traverse_module_state(state, visit, arg); - return 0; + return traverse_module_state(state, visit, arg); } static int From 837b4bb2758c10c151c6ce82680b7e2fe1cb98b3 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Wed, 25 Jun 2025 10:45:59 +0300 Subject: [PATCH 2/2] `module_clear` does the same thing --- Modules/_interpchannelsmodule.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/_interpchannelsmodule.c b/Modules/_interpchannelsmodule.c index 2d8c5878cdaa84..9c1f8615161275 100644 --- a/Modules/_interpchannelsmodule.c +++ b/Modules/_interpchannelsmodule.c @@ -3624,8 +3624,7 @@ module_clear(PyObject *mod) assert(state != NULL); // Now we clear the module state. - (void)clear_module_state(state); - return 0; + return clear_module_state(state); } static void