]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-99300: Replace Py_INCREF() with Py_NewRef() in _elementtree.c (#99696)
authorVictor Stinner <vstinner@python.org>
Tue, 22 Nov 2022 21:17:06 +0000 (22:17 +0100)
committerGitHub <noreply@github.com>
Tue, 22 Nov 2022 21:17:06 +0000 (22:17 +0100)
commitf1a4a6a58736196f766d51f048d19a2b0a0a155a
treeab4497c7054aebea934b5139a16d160e66f71533
parentf5fea2288620cb2fda24f3eecc9d623331fe4401
gh-99300: Replace Py_INCREF() with Py_NewRef() in _elementtree.c (#99696)

* Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef()
  and Py_XNewRef() in Modules/_elementtree.c.
* Make reference counting more explicit: don't steal implicitly a
  reference on PyList_SET_ITEM(), use Py_NewRef() instead.
* Replace PyModule_AddObject() with PyModule_AddObjectRef().
Modules/_elementtree.c