◐ Shell
clean mode source ↗

gh-112066: Add `PyDict_SetDefaultRef` function. by colesbury · Pull Request #112123 · python/cpython

The `PyDict_SetDefaultRef` function is similar to `PyDict_SetDefault`,
but returns a strong reference through the optional `**result` pointer
instead of a borrowed reference.

@colesbury

serhiy-storchaka

encukou

Co-authored-by: Petr Viktorin <encukou@gmail.com>

serhiy-storchaka

@colesbury

serhiy-storchaka

@colesbury

fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request

Feb 14, 2024
The `PyDict_SetDefaultRef` function is similar to `PyDict_SetDefault`,
but returns a strong reference through the optional `**result` pointer
instead of a borrowed reference.

Co-authored-by: Petr Viktorin <encukou@gmail.com>