Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-108308: Replace _PyDict_GetItemStringWithError() #108372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Aug 23, 2023

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

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Good change!

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

Co-Authored-by: Serhiy Storchaka <[email protected]>
@vstinner
Copy link
Member Author

@serhiy-storchaka: I integrated your suggested changes and made you as a co-author. I addressed your review. Would you mind to review the updated PR?

@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
Member

@serhiy-storchaka: I integrated your suggested changes and made you as a co-author.

Oh, it was minor comment. I like how this API allows to write the code in multiple ways, to better fit in every particular case.

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