diff options
author | Neil Schemenauer <nas-github@arctrix.com> | 2024-12-03 10:33:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-03 10:33:06 -0800 |
commit | fc5a0dc22483a35068888e828c65796d7a792c14 (patch) | |
tree | f3c92006e7f12df9515e20346d31abe01c21c800 /Lib/trace.py | |
parent | 276cd66ccbbf85996a57bd1db3dd29b93a6eab64 (diff) | |
download | cpython-fc5a0dc22483a35068888e828c65796d7a792c14.tar.gz cpython-fc5a0dc22483a35068888e828c65796d7a792c14.zip |
gh-127271: Replace use of PyCell_GET/SET (gh-127272)
* Replace uses of `PyCell_GET` and `PyCell_SET`. These macros are not
safe to use in the free-threaded build. Use `PyCell_GetRef()` and
`PyCell_SetTakeRef()` instead.
* Since `PyCell_GetRef()` returns a strong rather than borrowed ref, some
code restructuring was required, e.g. `frame_get_var()` returns a strong
ref now.
* Add critical sections to `PyCell_GET` and `PyCell_SET`.
* Move critical_section.h earlier in the Python.h file.
* Add `PyCell_GET` to the free-threading howto table of APIs that return
borrowed refs.
* Add additional unit tests for free-threading.
Diffstat (limited to 'Lib/trace.py')
0 files changed, 0 insertions, 0 deletions