Skip to content

gh-99300: Replace Py_INCREF() with Py_NewRef() in _elementtree.c - #99696

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:etree_newref
Nov 22, 2022
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:etree_newref

Conversation

@vstinner

@vstinner vstinner commented Nov 22, 2022 •

Copy link
Copy Markdown
Member
  • 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().
* 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().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants