mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #20440: Cleaning up the code by using Py_SETREF.
This commit is contained in:
parent
dcf76c9d0a
commit
576f132b98
14 changed files with 39 additions and 120 deletions
|
@ -396,10 +396,8 @@ element_init(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
Py_XDECREF(attrib);
|
||||
|
||||
/* Replace the objects already pointed to by tag, text and tail. */
|
||||
tmp = self_elem->tag;
|
||||
Py_INCREF(tag);
|
||||
self_elem->tag = tag;
|
||||
Py_DECREF(tmp);
|
||||
Py_SETREF(self_elem->tag, tag);
|
||||
|
||||
tmp = self_elem->text;
|
||||
Py_INCREF(Py_None);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue