]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-135839: Fix `module_traverse` and `module_clear` in `_interpchannelsmodule...
authorsobolevn <mail@sobolevn.me>
Wed, 25 Jun 2025 09:25:27 +0000 (12:25 +0300)
committerGitHub <noreply@github.com>
Wed, 25 Jun 2025 09:25:27 +0000 (12:25 +0300)
(cherry picked from commit dd59c786cfb1018eb5abe877bfa7265ea9a3c2b9)

Modules/_interpchannelsmodule.c

index 7f812d9eac69e83da98244adcea1ada64e1fc8c3..4bfefd65f174466d4e526fdf26222a675fcdd807 100644 (file)
@@ -3556,8 +3556,7 @@ module_traverse(PyObject *mod, visitproc visit, void *arg)
 {
     module_state *state = get_module_state(mod);
     assert(state != NULL);
-    traverse_module_state(state, visit, arg);
-    return 0;
+    return traverse_module_state(state, visit, arg);
 }
 
 static int
@@ -3567,8 +3566,7 @@ module_clear(PyObject *mod)
     assert(state != NULL);
 
     // Now we clear the module state.
-    clear_module_state(state);
-    return 0;
+    return clear_module_state(state);
 }
 
 static void