]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-90763: Modernise xx template module initialisation (GH-93078) (#93681)
authorErlend Egeberg Aasland <erlend.aasland@protonmail.com>
Fri, 10 Jun 2022 11:28:48 +0000 (13:28 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Jun 2022 11:28:48 +0000 (13:28 +0200)
commit175ed6e52c7bf6d9805ac8b56ad3f38e46ff7de5
tree5c15d5d342bd7cda0ebdfcf346141cb130fb10d1
parent927b5afee73218500a8fa80df86216cfdc24ef5a
[3.11] gh-90763: Modernise xx template module initialisation (GH-93078) (#93681)

Use C APIs such as PyModule_AddType instead of PyModule_AddObject.
Also remove incorrect module decrefs if module fails to initialise.
(cherry picked from commit a87c9b538fbfc42883417c4d5e69f1a5922690e3)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Modules/xxlimited_35.c
Modules/xxmodule.c