Skip to content

Commit 0f085e2

Browse files
committed
[3.13] pythongh-135839: Fix module_traverse and module_clear in _interpchannelsmodule (pythonGH-135840)
(cherry picked from commit dd59c78) Co-authored-by: sobolevn <[email protected]>
1 parent c344aad commit 0f085e2

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Modules/_interpchannelsmodule.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3556,8 +3556,12 @@ module_traverse(PyObject *mod, visitproc visit, void *arg)
35563556
{
35573557
module_state *state = get_module_state(mod);
35583558
assert(state != NULL);
3559+
<<<<<<< HEAD
35593560
traverse_module_state(state, visit, arg);
35603561
return 0;
3562+
=======
3563+
return traverse_module_state(state, visit, arg);
3564+
>>>>>>> dd59c786cfb (gh-135839: Fix `module_traverse` and `module_clear` in `_interpchannelsmodule` (#135840))
35613565
}
35623566

35633567
static int
@@ -3567,8 +3571,12 @@ module_clear(PyObject *mod)
35673571
assert(state != NULL);
35683572

35693573
// Now we clear the module state.
3574+
<<<<<<< HEAD
35703575
clear_module_state(state);
35713576
return 0;
3577+
=======
3578+
return clear_module_state(state);
3579+
>>>>>>> dd59c786cfb (gh-135839: Fix `module_traverse` and `module_clear` in `_interpchannelsmodule` (#135840))
35723580
}
35733581

35743582
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)