bpo-1635741: Calling Py_INCREF() after PyModule_AddObject() success to run by shihai1991 · Pull Request #18365 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Conversation

@shihai1991

Oh, it is generated file, i will check this operation soon.

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

Feb 5, 2020

@shihai1991

cc @vstinner Hi, victor. It's a small fix. pls review it if you have free time.

@vstinner

@isidentical

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

@brandtbucher

I'm also working my way through the other broken modules in bpo-38823. I need to land #17298 before I can make further progress, though.

brandtbucher

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.

@shihai1991

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 kylotan mannequin mentioned this pull request

Sep 19, 2022

Labels