summaryrefslogtreecommitdiff
path: root/Modules/clinic/_elementtree.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/clinic/_elementtree.c.h')
-rw-r--r--Modules/clinic/_elementtree.c.h74
1 files changed, 49 insertions, 25 deletions
diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h
index 1b309cd88c..c13cb35c70 100644
--- a/Modules/clinic/_elementtree.c.h
+++ b/Modules/clinic/_elementtree.c.h
@@ -151,7 +151,7 @@ _elementtree_Element_find(ElementObject *self, PyObject **args, Py_ssize_t nargs
PyObject *path;
PyObject *namespaces = Py_None;
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&path, &namespaces)) {
goto exit;
}
@@ -184,7 +184,7 @@ _elementtree_Element_findtext(ElementObject *self, PyObject **args, Py_ssize_t n
PyObject *default_value = Py_None;
PyObject *namespaces = Py_None;
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&path, &default_value, &namespaces)) {
goto exit;
}
@@ -215,7 +215,7 @@ _elementtree_Element_findall(ElementObject *self, PyObject **args, Py_ssize_t na
PyObject *path;
PyObject *namespaces = Py_None;
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&path, &namespaces)) {
goto exit;
}
@@ -246,7 +246,7 @@ _elementtree_Element_iterfind(ElementObject *self, PyObject **args, Py_ssize_t n
PyObject *path;
PyObject *namespaces = Py_None;
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&path, &namespaces)) {
goto exit;
}
@@ -277,7 +277,7 @@ _elementtree_Element_get(ElementObject *self, PyObject **args, Py_ssize_t nargs,
PyObject *key;
PyObject *default_value = Py_None;
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&key, &default_value)) {
goto exit;
}
@@ -323,7 +323,7 @@ _elementtree_Element_iter(ElementObject *self, PyObject **args, Py_ssize_t nargs
static _PyArg_Parser _parser = {"|O:iter", _keywords, 0};
PyObject *tag = Py_None;
- if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
&tag)) {
goto exit;
}
@@ -356,23 +356,27 @@ PyDoc_STRVAR(_elementtree_Element_insert__doc__,
"\n");
#define _ELEMENTTREE_ELEMENT_INSERT_METHODDEF \
- {"insert", (PyCFunction)_elementtree_Element_insert, METH_VARARGS, _elementtree_Element_insert__doc__},
+ {"insert", (PyCFunction)_elementtree_Element_insert, METH_FASTCALL, _elementtree_Element_insert__doc__},
static PyObject *
_elementtree_Element_insert_impl(ElementObject *self, Py_ssize_t index,
PyObject *subelement);
static PyObject *
-_elementtree_Element_insert(ElementObject *self, PyObject *args)
+_elementtree_Element_insert(ElementObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_ssize_t index;
PyObject *subelement;
- if (!PyArg_ParseTuple(args, "nO!:insert",
+ if (!_PyArg_ParseStack(args, nargs, "nO!:insert",
&index, &Element_Type, &subelement)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("insert", kwnames)) {
+ goto exit;
+ }
return_value = _elementtree_Element_insert_impl(self, index, subelement);
exit:
@@ -419,24 +423,28 @@ PyDoc_STRVAR(_elementtree_Element_makeelement__doc__,
"\n");
#define _ELEMENTTREE_ELEMENT_MAKEELEMENT_METHODDEF \
- {"makeelement", (PyCFunction)_elementtree_Element_makeelement, METH_VARARGS, _elementtree_Element_makeelement__doc__},
+ {"makeelement", (PyCFunction)_elementtree_Element_makeelement, METH_FASTCALL, _elementtree_Element_makeelement__doc__},
static PyObject *
_elementtree_Element_makeelement_impl(ElementObject *self, PyObject *tag,
PyObject *attrib);
static PyObject *
-_elementtree_Element_makeelement(ElementObject *self, PyObject *args)
+_elementtree_Element_makeelement(ElementObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *tag;
PyObject *attrib;
- if (!PyArg_UnpackTuple(args, "makeelement",
+ if (!_PyArg_UnpackStack(args, nargs, "makeelement",
2, 2,
&tag, &attrib)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("makeelement", kwnames)) {
+ goto exit;
+ }
return_value = _elementtree_Element_makeelement_impl(self, tag, attrib);
exit:
@@ -475,24 +483,28 @@ PyDoc_STRVAR(_elementtree_Element_set__doc__,
"\n");
#define _ELEMENTTREE_ELEMENT_SET_METHODDEF \
- {"set", (PyCFunction)_elementtree_Element_set, METH_VARARGS, _elementtree_Element_set__doc__},
+ {"set", (PyCFunction)_elementtree_Element_set, METH_FASTCALL, _elementtree_Element_set__doc__},
static PyObject *
_elementtree_Element_set_impl(ElementObject *self, PyObject *key,
PyObject *value);
static PyObject *
-_elementtree_Element_set(ElementObject *self, PyObject *args)
+_elementtree_Element_set(ElementObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *value;
- if (!PyArg_UnpackTuple(args, "set",
+ if (!_PyArg_UnpackStack(args, nargs, "set",
2, 2,
&key, &value)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("set", kwnames)) {
+ goto exit;
+ }
return_value = _elementtree_Element_set_impl(self, key, value);
exit:
@@ -560,24 +572,28 @@ PyDoc_STRVAR(_elementtree_TreeBuilder_start__doc__,
"\n");
#define _ELEMENTTREE_TREEBUILDER_START_METHODDEF \
- {"start", (PyCFunction)_elementtree_TreeBuilder_start, METH_VARARGS, _elementtree_TreeBuilder_start__doc__},
+ {"start", (PyCFunction)_elementtree_TreeBuilder_start, METH_FASTCALL, _elementtree_TreeBuilder_start__doc__},
static PyObject *
_elementtree_TreeBuilder_start_impl(TreeBuilderObject *self, PyObject *tag,
PyObject *attrs);
static PyObject *
-_elementtree_TreeBuilder_start(TreeBuilderObject *self, PyObject *args)
+_elementtree_TreeBuilder_start(TreeBuilderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *tag;
PyObject *attrs = Py_None;
- if (!PyArg_UnpackTuple(args, "start",
+ if (!_PyArg_UnpackStack(args, nargs, "start",
1, 2,
&tag, &attrs)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("start", kwnames)) {
+ goto exit;
+ }
return_value = _elementtree_TreeBuilder_start_impl(self, tag, attrs);
exit:
@@ -647,25 +663,29 @@ PyDoc_STRVAR(_elementtree_XMLParser_doctype__doc__,
"\n");
#define _ELEMENTTREE_XMLPARSER_DOCTYPE_METHODDEF \
- {"doctype", (PyCFunction)_elementtree_XMLParser_doctype, METH_VARARGS, _elementtree_XMLParser_doctype__doc__},
+ {"doctype", (PyCFunction)_elementtree_XMLParser_doctype, METH_FASTCALL, _elementtree_XMLParser_doctype__doc__},
static PyObject *
_elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
PyObject *pubid, PyObject *system);
static PyObject *
-_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject *args)
+_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *name;
PyObject *pubid;
PyObject *system;
- if (!PyArg_UnpackTuple(args, "doctype",
+ if (!_PyArg_UnpackStack(args, nargs, "doctype",
3, 3,
&name, &pubid, &system)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("doctype", kwnames)) {
+ goto exit;
+ }
return_value = _elementtree_XMLParser_doctype_impl(self, name, pubid, system);
exit:
@@ -678,7 +698,7 @@ PyDoc_STRVAR(_elementtree_XMLParser__setevents__doc__,
"\n");
#define _ELEMENTTREE_XMLPARSER__SETEVENTS_METHODDEF \
- {"_setevents", (PyCFunction)_elementtree_XMLParser__setevents, METH_VARARGS, _elementtree_XMLParser__setevents__doc__},
+ {"_setevents", (PyCFunction)_elementtree_XMLParser__setevents, METH_FASTCALL, _elementtree_XMLParser__setevents__doc__},
static PyObject *
_elementtree_XMLParser__setevents_impl(XMLParserObject *self,
@@ -686,20 +706,24 @@ _elementtree_XMLParser__setevents_impl(XMLParserObject *self,
PyObject *events_to_report);
static PyObject *
-_elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *args)
+_elementtree_XMLParser__setevents(XMLParserObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *events_queue;
PyObject *events_to_report = Py_None;
- if (!PyArg_UnpackTuple(args, "_setevents",
+ if (!_PyArg_UnpackStack(args, nargs, "_setevents",
1, 2,
&events_queue, &events_to_report)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("_setevents", kwnames)) {
+ goto exit;
+ }
return_value = _elementtree_XMLParser__setevents_impl(self, events_queue, events_to_report);
exit:
return return_value;
}
-/*[clinic end generated code: output=b4a571a98ced3163 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b69fa98c40917f58 input=a9049054013a1b77]*/