SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

72125 0 12 Python

gh-128844: Make `_Py_TryIncref` public as an unstable API. (#128926)

This exposes `_Py_TryIncref` as `PyUnstable_TryIncref()` and the helper
function `_PyObject_SetMaybeWeakref` as `PyUnstable_EnableTryIncRef`.

These are helpers for dealing with unowned references in a safe way,
particularly in the free threading build.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
S
Sam Gross committed
d23f5701ad2a64c7877bb37258420c417357423e
Parent: 7dd0a7e
Committed by GitHub <noreply@github.com> on 1/28/2025, 7:32:27 PM