aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-02-28 14:16:39 -0700
committerGitHub <noreply@github.com>2023-02-28 14:16:39 -0700
commit880437d4ec65ef35d505eeaff9dad5c6654dbc1a (patch)
tree1dee8a4dcc709b6b9f99d025cddbe3fe14ceadd5 /Python/Python-ast.c
parentgh-100227: Move the dtoa State to PyInterpreterState (gh-102331) (diff)
downloadcpython-880437d4ec65ef35d505eeaff9dad5c6654dbc1a.tar.gz
cpython-880437d4ec65ef35d505eeaff9dad5c6654dbc1a.tar.bz2
cpython-880437d4ec65ef35d505eeaff9dad5c6654dbc1a.zip
gh-100227: Move _str_replace_inf to PyInterpreterState (gh-102333)
https://github.com/python/cpython/issues/100227
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 d113c47b953..6c878474afb 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;