bpo-1635741: Calling Py_INCREF() after PyModule_AddObject() success to run by shihai1991 · Pull Request #18365 · python/cpython
Navigation Menu
- Notifications You must be signed in to change notification settings
- Fork 34.2k
Conversation
shihai1991
changed the title
bpo-1635741: Calling Py_DECREF() if PyModule_AddObject() fails to run
bpo-1635741: Calling Py_INCREF() after PyModule_AddObject() success to run
cc @vstinner Hi, victor. It's a small fix. pls review it if you have free time.
I recently saw a PR from @brandtbucher about a more general change that already includes this if I am not mistaken. Check out #17276 (it moves incref after the check by moving check upper). I am in favor of #17276 because it handles the case better also it opened before this PR
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, my PR #17276 is a more comprehensive fix.
Oh, thank you for quick feedback, guys.
I checked Brandt's PRs, its enhance very nice. Pls go ahead, thanks. I will subscribe your PRs ;)
kylotan
mannequin
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters