gh-108308: Replace _PyDict_GetItemStringWithError() by vstinner · Pull Request #108372 · python/cpython · GitHub
Skip to content

gh-108308: Replace _PyDict_GetItemStringWithError() - #108372

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:dict_getref2
Aug 23, 2023
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:dict_getref2

Conversation

@vstinner

@vstinner vstinner commented Aug 23, 2023

Copy link
Copy Markdown
Member

Replace _PyDict_GetItemStringWithError() calls with PyDict_GetItemStringRef() which returns a strong reference to the item.

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change!

Comment thread Objects/structseq.c Outdated
Comment thread Python/pylifecycle.c
Comment thread Python/pylifecycle.c
Comment thread Python/pylifecycle.c Outdated
Comment thread Python/pylifecycle.c
Replace _PyDict_GetItemStringWithError() calls with
PyDict_GetItemStringRef() which returns a strong reference to the
item.

Co-Authored-by: Serhiy Storchaka <storchaka@gmail.com>
@vstinner

Copy link
Copy Markdown
Member Author

@vstinner
vstinner merged commit 4dc9f48 into python:main Aug 23, 2023
@vstinner
vstinner deleted the dict_getref2 branch August 23, 2023 20:59
@serhiy-storchaka

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants