diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-02-28 21:16:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-28 21:16:39 (GMT) |
commit | 880437d4ec65ef35d505eeaff9dad5c6654dbc1a (patch) | |
tree | 1dee8a4dcc709b6b9f99d025cddbe3fe14ceadd5 /Parser/asdl_c.py | |
parent | f300a1fa4c121f7807cbda4fc8bb26240c69ea74 (diff) | |
download | cpython-880437d4ec65ef35d505eeaff9dad5c6654dbc1a.zip cpython-880437d4ec65ef35d505eeaff9dad5c6654dbc1a.tar.gz cpython-880437d4ec65ef35d505eeaff9dad5c6654dbc1a.tar.bz2 |
gh-100227: Move _str_replace_inf to PyInterpreterState (gh-102333)
https://github.com/python/cpython/issues/100227
Diffstat (limited to 'Parser/asdl_c.py')
-rwxr-xr-x | Parser/asdl_c.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index db0e597..b44e303 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -1484,9 +1484,7 @@ def generate_ast_fini(module_state, f): for s in module_state: f.write(" Py_CLEAR(state->" + s + ');\n') f.write(textwrap.dedent(""" - 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; |