summaryrefslogtreecommitdiff
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r--Python/Python-ast.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index d113c47b95..6c878474af 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -263,9 +263,7 @@ void _PyAST_Fini(PyInterpreterState *interp)
Py_CLEAR(state->vararg);
Py_CLEAR(state->withitem_type);
- if (_PyInterpreterState_Get() == _PyInterpreterState_Main()) {
- Py_CLEAR(_Py_CACHED_OBJECT(str_replace_inf));
- }
+ Py_CLEAR(_Py_INTERP_CACHED_OBJECT(interp, str_replace_inf));
#if !defined(NDEBUG)
state->initialized = -1;