]> granicus.if.org Git - python/commitdiff
Fix xml.etree.ElementTree.Element.getiterator()
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 29 Sep 2016 20:12:35 +0000 (22:12 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 29 Sep 2016 20:12:35 +0000 (22:12 +0200)
Issue #28314: Fix function declaration (C flags) for the getiterator() method
of xml.etree.ElementTree.Element.

Misc/NEWS
Modules/_elementtree.c

index e71a20df2b498808c93bfd7a6844f2a8723a9b7a..aecd0c325fc5652a19d79154efe988f5afb74126 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -44,6 +44,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #28314: Fix function declaration (C flags) for the getiterator() method
+  of xml.etree.ElementTree.Element.
+
 - Issue #28148: Stop using localtime() and gmtime() in the time
   module.
 
index dd8417a1ac741ca88e7cea68d162b4df6b32872f..3362195ed635b1c06ebd40351f1a798ebe74de53 100644 (file)
@@ -3702,7 +3702,7 @@ static PyMethodDef element_methods[] = {
     _ELEMENTTREE_ELEMENT_ITERTEXT_METHODDEF
     _ELEMENTTREE_ELEMENT_ITERFIND_METHODDEF
 
-    {"getiterator", (PyCFunction)_elementtree_Element_iter, METH_VARARGS|METH_KEYWORDS, _elementtree_Element_iter__doc__},
+    {"getiterator", (PyCFunction)_elementtree_Element_iter, METH_FASTCALL, _elementtree_Element_iter__doc__},
     _ELEMENTTREE_ELEMENT_GETCHILDREN_METHODDEF
 
     _ELEMENTTREE_ELEMENT_ITEMS_METHODDEF