summaryrefslogtreecommitdiff
path: root/Modules/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-12-07 02:31:11 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-12-07 02:31:11 +0200
commit8b5502dee0a559ea1975ff4aa76197c501a2ac33 (patch)
tree153c8c6f85258b46f96834c958d33bcdc2e4a48e /Modules/clinic
parent41826ed7d791ed4545da7ea5256f6ff48f0390d7 (diff)
downloadcpython-8b5502dee0a559ea1975ff4aa76197c501a2ac33.tar.gz
Issue #25638: Optimized ElementTree.iterparse(); it is now 2x faster.
ElementTree.XMLParser._setevents now accepts any objects with the append method, not just a list.
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/_elementtree.c.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h
index 86b4c4cec7..92e98cf0a2 100644
--- a/Modules/clinic/_elementtree.c.h
+++ b/Modules/clinic/_elementtree.c.h
@@ -668,12 +668,13 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *args)
PyObject *events_queue;
PyObject *events_to_report = Py_None;
- if (!PyArg_ParseTuple(args, "O!|O:_setevents",
- &PyList_Type, &events_queue, &events_to_report))
+ if (!PyArg_UnpackTuple(args, "_setevents",
+ 1, 2,
+ &events_queue, &events_to_report))
goto exit;
return_value = _elementtree_XMLParser__setevents_impl(self, events_queue, events_to_report);
exit:
return return_value;
}
-/*[clinic end generated code: output=25b8bf7e7f2151ca input=a9049054013a1b77]*/
+/*[clinic end generated code: output=19d94e2d2726d3aa input=a9049054013a1b77]*/