diff options
Diffstat (limited to 'Modules/_elementtree.c')
-rw-r--r-- | Modules/_elementtree.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index a035c57..793d4c7 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -1574,7 +1574,7 @@ element_setattr(ElementObject* self, const char* name, PyObject* value) if (strcmp(name, "tag") == 0) { Py_INCREF(value); - Py_SETREF(self->tag, value); + Py_XSETREF(self->tag, value); } else if (strcmp(name, "text") == 0) { Py_DECREF(JOIN_OBJ(self->text)); self->text = value; @@ -1587,7 +1587,7 @@ element_setattr(ElementObject* self, const char* name, PyObject* value) if (!self->extra) element_new_extra(self, NULL); Py_INCREF(value); - Py_SETREF(self->extra->attrib, value); + Py_XSETREF(self->extra->attrib, value); } else { PyErr_SetString(PyExc_AttributeError, name); return -1; @@ -1799,10 +1799,10 @@ treebuilder_handle_start(TreeBuilderObject* self, PyObject* tag, self->index++; Py_INCREF(node); - Py_SETREF(self->this, (ElementObject*) node); + Py_XSETREF(self->this, (ElementObject*) node); Py_INCREF(node); - Py_SETREF(self->last, (ElementObject*) node); + Py_XSETREF(self->last, (ElementObject*) node); if (treebuilder_append_event(self, self->start_event_obj, node) < 0) goto error; @@ -2744,7 +2744,7 @@ xmlparser_setevents(XMLParserObject* self, PyObject* args) target = (TreeBuilderObject*) self->target; Py_INCREF(events); - Py_SETREF(target->events, events); + Py_XSETREF(target->events, events); /* clear out existing events */ Py_CLEAR(target->start_event_obj); @@ -2769,18 +2769,18 @@ xmlparser_setevents(XMLParserObject* self, PyObject* args) Py_INCREF(item); event = PyString_AS_STRING(item); if (strcmp(event, "start") == 0) { - Py_SETREF(target->start_event_obj, item); + Py_XSETREF(target->start_event_obj, item); } else if (strcmp(event, "end") == 0) { - Py_SETREF(target->end_event_obj, item); + Py_XSETREF(target->end_event_obj, item); } else if (strcmp(event, "start-ns") == 0) { - Py_SETREF(target->start_ns_event_obj, item); + Py_XSETREF(target->start_ns_event_obj, item); EXPAT(SetNamespaceDeclHandler)( self->parser, (XML_StartNamespaceDeclHandler) expat_start_ns_handler, (XML_EndNamespaceDeclHandler) expat_end_ns_handler ); } else if (strcmp(event, "end-ns") == 0) { - Py_SETREF(target->end_ns_event_obj, item); + Py_XSETREF(target->end_ns_event_obj, item); EXPAT(SetNamespaceDeclHandler)( self->parser, (XML_StartNamespaceDeclHandler) expat_start_ns_handler, |