mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
[3.13] gh-135839: Fix module_traverse and module_clear in subinterp modules (GH-135937) (GH-135943)
(cherry picked from commit bcc2cbaa7f)
This commit is contained in:
parent
d0c6b09685
commit
17392a71ae
2 changed files with 4 additions and 8 deletions
|
|
@ -1937,8 +1937,7 @@ static int
|
|||
module_traverse(PyObject *mod, visitproc visit, void *arg)
|
||||
{
|
||||
module_state *state = get_module_state(mod);
|
||||
traverse_module_state(state, visit, arg);
|
||||
return 0;
|
||||
return traverse_module_state(state, visit, arg);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -1947,8 +1946,7 @@ module_clear(PyObject *mod)
|
|||
module_state *state = get_module_state(mod);
|
||||
|
||||
// Now we clear the module state.
|
||||
clear_module_state(state);
|
||||
return 0;
|
||||
return clear_module_state(state);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -1540,8 +1540,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
|
||||
|
|
@ -1549,8 +1548,7 @@ module_clear(PyObject *mod)
|
|||
{
|
||||
module_state *state = get_module_state(mod);
|
||||
assert(state != NULL);
|
||||
clear_module_state(state);
|
||||
return 0;
|
||||
return clear_module_state(state);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue