mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-135839: Fix module_traverse
and module_clear
in subinterp modules (#135937)
This commit is contained in:
parent
c2f2fd4eca
commit
bcc2cbaa7f
2 changed files with 4 additions and 8 deletions
|
@ -1952,8 +1952,7 @@ static int
|
||||||
module_traverse(PyObject *mod, visitproc visit, void *arg)
|
module_traverse(PyObject *mod, visitproc visit, void *arg)
|
||||||
{
|
{
|
||||||
module_state *state = get_module_state(mod);
|
module_state *state = get_module_state(mod);
|
||||||
(void)traverse_module_state(state, visit, arg);
|
return traverse_module_state(state, visit, arg);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -1962,8 +1961,7 @@ module_clear(PyObject *mod)
|
||||||
module_state *state = get_module_state(mod);
|
module_state *state = get_module_state(mod);
|
||||||
|
|
||||||
// Now we clear the module state.
|
// Now we clear the module state.
|
||||||
(void)clear_module_state(state);
|
return clear_module_state(state);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -1706,8 +1706,7 @@ module_traverse(PyObject *mod, visitproc visit, void *arg)
|
||||||
{
|
{
|
||||||
module_state *state = get_module_state(mod);
|
module_state *state = get_module_state(mod);
|
||||||
assert(state != NULL);
|
assert(state != NULL);
|
||||||
(void)traverse_module_state(state, visit, arg);
|
return traverse_module_state(state, visit, arg);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -1715,8 +1714,7 @@ module_clear(PyObject *mod)
|
||||||
{
|
{
|
||||||
module_state *state = get_module_state(mod);
|
module_state *state = get_module_state(mod);
|
||||||
assert(state != NULL);
|
assert(state != NULL);
|
||||||
(void)clear_module_state(state);
|
return clear_module_state(state);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue