summaryrefslogtreecommitdiffstats
path: root/Modules/_elementtree.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-04-10 15:12:01 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-04-10 15:12:01 (GMT)
commitf01e408c1688a207eba18444da8c151c872fba59 (patch)
tree3330812d856579add4526f10d5284164a15b6037 /Modules/_elementtree.c
parent47c5474aa0cbe8dc3cf2c370b19769edd3f2e8d8 (diff)
parent57a01d3a0ee20ee9eea69b658c6bac0f39541625 (diff)
downloadcpython-f01e408c1688a207eba18444da8c151c872fba59.zip
cpython-f01e408c1688a207eba18444da8c151c872fba59.tar.gz
cpython-f01e408c1688a207eba18444da8c151c872fba59.tar.bz2
Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
Diffstat (limited to 'Modules/_elementtree.c')
-rw-r--r--Modules/_elementtree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index 5c49c15..63639c7 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -1957,7 +1957,7 @@ element_tag_setter(ElementObject *self, PyObject *value, void *closure)
{
_VALIDATE_ATTR_VALUE(value);
Py_INCREF(value);
- Py_XSETREF(self->tag, value);
+ Py_SETREF(self->tag, value);
return 0;
}
@@ -1990,7 +1990,7 @@ element_attrib_setter(ElementObject *self, PyObject *value, void *closure)
return -1;
}
Py_INCREF(value);
- Py_XSETREF(self->extra->attrib, value);
+ Py_SETREF(self->extra->attrib, value);
return 0;
}
@@ -2524,9 +2524,9 @@ treebuilder_handle_start(TreeBuilderObject* self, PyObject* tag,
self->index++;
Py_INCREF(node);
- Py_XSETREF(self->this, node);
+ Py_SETREF(self->this, node);
Py_INCREF(node);
- Py_XSETREF(self->last, node);
+ Py_SETREF(self->last, node);
if (treebuilder_append_event(self, self->start_event_obj, node) < 0)
goto error;