mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-135839: Fix module_traverse and module_clear in subinterp modules (GH-135937) (#135939)
gh-135839: Fix `module_traverse` and `module_clear` in subinterp modules (GH-135937)
(cherry picked from commit bcc2cbaa7f)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
8ef0398238
commit
6e5350d8b9
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