diff options
author | Ken Jin <kenjin@python.org> | 2024-10-14 08:17:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-14 08:17:51 (GMT) |
commit | 4b358ee647809019813f106eb901f466a3846d98 (patch) | |
tree | 0beb9ba8e72c41e4f040bd4baccd27cd45a2d735 /Tools | |
parent | b52c7306ea4470f9d7548655c2a1b89a07ff5504 (diff) | |
download | cpython-4b358ee647809019813f106eb901f466a3846d98.zip cpython-4b358ee647809019813f106eb901f466a3846d98.tar.gz cpython-4b358ee647809019813f106eb901f466a3846d98.tar.bz2 |
gh-125323: Remove some unsafe Py_DECREFs in bytecodes.c, replacing them with PyStackRef_CLOSEs (GH-125324)
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/cases_generator/analyzer.py | 1 | ||||
-rw-r--r-- | Tools/cases_generator/generators_common.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Tools/cases_generator/analyzer.py b/Tools/cases_generator/analyzer.py index 60f5d01..19fdeac 100644 --- a/Tools/cases_generator/analyzer.py +++ b/Tools/cases_generator/analyzer.py @@ -540,6 +540,7 @@ NON_ESCAPING_FUNCTIONS = ( "PyStackRef_AsPyObjectSteal", "PyStackRef_CLEAR", "PyStackRef_CLOSE", + "PyStackRef_CLOSE_SPECIALIZED", "PyStackRef_DUP", "PyStackRef_False", "PyStackRef_FromPyObjectImmortal", diff --git a/Tools/cases_generator/generators_common.py b/Tools/cases_generator/generators_common.py index 0bfa1a3..7e032c2 100644 --- a/Tools/cases_generator/generators_common.py +++ b/Tools/cases_generator/generators_common.py @@ -116,6 +116,7 @@ class Emitter: "SAVE_STACK": self.save_stack, "RELOAD_STACK": self.reload_stack, "PyStackRef_CLOSE": self.stackref_close, + "PyStackRef_CLOSE_SPECIALIZED": self.stackref_close, "PyStackRef_AsPyObjectSteal": self.stackref_steal, "DISPATCH": self.dispatch } |