Skip to content

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 <storchaka@gmail.com>
@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