Skip to content

Commit 17392a7

Browse files
authored
[3.13] pythongh-135839: Fix module_traverse and module_clear in subinterp modules (pythonGH-135937) (pythonGH-135943)
(cherry picked from commit bcc2cba)
1 parent d0c6b09 commit 17392a7

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Modules/_interpqueuesmodule.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,8 +1937,7 @@ static int
19371937
module_traverse(PyObject *mod, visitproc visit, void *arg)
19381938
{
19391939
module_state *state = get_module_state(mod);
1940-
traverse_module_state(state, visit, arg);
1941-
return 0;
1940+
return traverse_module_state(state, visit, arg);
19421941
}
19431942

19441943
static int
@@ -1947,8 +1946,7 @@ module_clear(PyObject *mod)
19471946
module_state *state = get_module_state(mod);
19481947

19491948
// Now we clear the module state.
1950-
clear_module_state(state);
1951-
return 0;
1949+
return clear_module_state(state);
19521950
}
19531951

19541952
static void

Modules/_interpretersmodule.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,17 +1540,15 @@ module_traverse(PyObject *mod, visitproc visit, void *arg)
15401540
{
15411541
module_state *state = get_module_state(mod);
15421542
assert(state != NULL);
1543-
traverse_module_state(state, visit, arg);
1544-
return 0;
1543+
return traverse_module_state(state, visit, arg);
15451544
}
15461545

15471546
static int
15481547
module_clear(PyObject *mod)
15491548
{
15501549
module_state *state = get_module_state(mod);
15511550
assert(state != NULL);
1552-
clear_module_state(state);
1553-
return 0;
1551+
return clear_module_state(state);
15541552
}
15551553

15561554
static void

0 commit comments

Comments
 (0)