8000 gh-135839: Fix `module_traverse` and `module_clear` in subinterp modules by sobolevn · Pull Request #135937 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-135839: Fix module_traverse and module_clear in subinterp modules #135937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Modules/_interpqueuesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1952,8 +1952,7 @@ static int
module_traverse(PyObject *mod, visitproc visit, void *arg)
{
module_state *state = get_module_state(mod);
(void)traverse_module_state(state, visit, arg);
return 0;
return traverse_module_state(state, visit, arg);
}

static int
Expand All @@ -1962,8 +1961,7 @@ module_clear(PyObject *mod)
module_state *state = get_module_state(mod);

// Now we clear the module state.
(void)clear_module_state(state);
return 0;
return clear_module_state(state);
}

static void
Expand Down
6 changes: 2 additions & 4 deletions Modules/_interpretersmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1706,17 +1706,15 @@ 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
module_clear(PyObject *mod)
{
module_state *state = get_module_state(mod);
assert(state != NULL);
(void)clear_module_state(state);
return 0;
return clear_module_state(state);
}

static void
Expand Down
Loading
0