diff options
author | Sam Gross <colesbury@gmail.com> | 2024-11-22 17:55:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-22 17:55:33 (GMT) |
commit | 4759ba6eec9f0b36b24b8eb7e7b120d471c67e82 (patch) | |
tree | ccadc7b0918507133e2f4ec4abff6d517f2b618e /Tools | |
parent | 8214e0f709010a0e1fa06dc2ce004b5f6103cc6b (diff) | |
download | cpython-4759ba6eec9f0b36b24b8eb7e7b120d471c67e82.zip cpython-4759ba6eec9f0b36b24b8eb7e7b120d471c67e82.tar.gz cpython-4759ba6eec9f0b36b24b8eb7e7b120d471c67e82.tar.bz2 |
gh-127022: Simplify `PyStackRef_FromPyObjectSteal` (#127024)
This gets rid of the immortal check in `PyStackRef_FromPyObjectSteal()`.
Overall, this improves performance about 2% in the free threading
build.
This also renames `PyStackRef_Is()` to `PyStackRef_IsExactly()` because
the macro requires that the tag bits of the arguments match, which is
only true in certain special cases.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/cases_generator/analyzer.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/cases_generator/analyzer.py b/Tools/cases_generator/analyzer.py index e02e07e..eca851e 100644 --- a/Tools/cases_generator/analyzer.py +++ b/Tools/cases_generator/analyzer.py @@ -548,7 +548,10 @@ NON_ESCAPING_FUNCTIONS = ( "PyStackRef_FromPyObjectImmortal", "PyStackRef_FromPyObjectNew", "PyStackRef_FromPyObjectSteal", - "PyStackRef_Is", + "PyStackRef_IsExactly", + "PyStackRef_IsNone", + "PyStackRef_IsTrue", + "PyStackRef_IsFalse", "PyStackRef_IsNull", "PyStackRef_None", "PyStackRef_TYPE", |