]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-108308: Use PyDict_GetItemRef() in moduleobject.c (#108381)
authorVictor Stinner <vstinner@python.org>
Wed, 23 Aug 2023 21:57:40 +0000 (23:57 +0200)
committerGitHub <noreply@github.com>
Wed, 23 Aug 2023 21:57:40 +0000 (21:57 +0000)
commit4890f65ecf119a18df926d42982c8c6d02f0b9fd
tree4ecc13c619feaae8dda67c5315bfb9c59b34c272
parent592bacb6fc0833336c0453e818e9b95016e9fd47
gh-108308: Use PyDict_GetItemRef() in moduleobject.c (#108381)

Replace PyDict_GetItemWithError() with PyDict_GetItemRef() which
returns a strong reference.

Cleanup also the function: move variable definition to their first
assignation, rename variable names to use name longer than 1
character.
Objects/moduleobject.c