-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-108308: Replace PyDict_GetItem() with PyDict_GetItemRef() #108309
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
Conversation
6a032b0
to
85e51b1
Compare
85e51b1
to
ce6ea31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually tried to make the compiler code clearer. But it requires so much work that I keep putting it off after another attempt.
Replace PyDict_GetItem() calls with PyDict_GetItemRef() to handle errors. pycore_init_builtins() now checks for _PyType_Lookup() failure.
ce6ea31
to
5c77056
Compare
@serhiy-storchaka: I addressed your review. Would you mind to review the updated PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There's a new commit after the PR has been approved. @serhiy-storchaka: please review the changes made to this pull request. |
Well, writing correct code requires to write more code. IMO it's worth it :-) |
Merged, thanks for the review Serhiy! |
|
|
I created #108373 to track this unrelated bug. |
Replace PyDict_GetItem() calls with PyDict_GetItemRef() to handle errors.