]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-135839: Fix `module_traverse` and `module_clear` in `_interpchannelsmodule` (...
authorsobolevn <mail@sobolevn.me>
Wed, 25 Jun 2025 08:54:42 +0000 (11:54 +0300)
committerGitHub <noreply@github.com>
Wed, 25 Jun 2025 08:54:42 +0000 (11:54 +0300)
Modules/_interpchannelsmodule.c

index ee5e2b005e0a5babd91f777384f0a322215c89ba..9c1f861516127587d51135719f58d6758fe18d36 100644 (file)
@@ -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
@@ -3625,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