]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117376: Make `Py_DECREF` a macro in ceval.c in free-threaded build (#122975)
authorSam Gross <colesbury@gmail.com>
Fri, 23 Aug 2024 19:36:14 +0000 (15:36 -0400)
committerGitHub <noreply@github.com>
Fri, 23 Aug 2024 19:36:14 +0000 (15:36 -0400)
commit556e8556849cb9df0666629b0f564b5dd203344c
treee51d923be9790eeb7e44e2f590baa502d723d383
parent67f2c84bff06eb837fd5ca64466d79f038e22ef8
gh-117376: Make `Py_DECREF` a macro in ceval.c in free-threaded build (#122975)

`Py_DECREF` and `PyStackRef_CLOSE` are now implemented as macros in the
free-threaded build in ceval.c. There are two motivations;

 * MSVC has problems inlining functions in ceval.c in the PGO build.

 * We will want to mark escaping calls in order to spill the stack
   pointer in ceval.c and we will want to do this around `_Py_Dealloc`
   (or `_Py_MergeZeroLocalRefcount` or `_Py_DecRefShared`), not around
   the entire `Py_DECREF` or `PyStackRef_CLOSE` call.
Include/internal/pycore_stackref.h
Python/ceval.c