-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
bpo-36796: Clean the error handling in _testcapimodule.c #13085
bpo-36796: Clean the error handling in _testcapimodule.c #13085
Conversation
In addition, fix possible ref counting bugs in test_L_code() and test_k_code() -- it was possible for "num" to be decrefed twice.
The timezone portion of the changes looks good to me, haven't looked at the other parts. |
Modules/_testcapimodule.c
Outdated
|
||
PyTuple_SET_ITEM(tuple, 0, num); | ||
PyTuple_SetItem(tuple, 0, num); |
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.
Why it has been changed?
Hi, @serhiy-storchaka. Thank you for the review. This PR deals solely with missing failure checks and possible ref counting bugs. If it is desired to make other changes to some functions in _testcapimodule.c, then perhaps that should be handled in a separate issue. |
@serhiy-storchaka do you continue to review the PR of @ZackerySpytz ? Thank you |
Thanks @ZackerySpytz for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
GH-113132 is a backport of this pull request to the 3.12 branch. |
) (cherry picked from commit a723a13) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
In addition, fix possible ref counting bugs in test_L_code() and
test_k_code() -- it was possible for "num" to be decrefed twice.
https://bugs.python.org/issue36796