1 /*[clinic input] 2 preserve 3 [clinic start generated code]*/ 4 5 PyDoc_STRVAR(_elementtree_Element_append__doc__, 6 "append($self, subelement, /)\n" 7 "--\n" 8 "\n"); 9 10 #define _ELEMENTTREE_ELEMENT_APPEND_METHODDEF \ 11 {"append", (PyCFunction)_elementtree_Element_append, METH_O, _elementtree_Element_append__doc__}, 12 13 static PyObject * 14 _elementtree_Element_append_impl(ElementObject *self, PyObject *subelement); 15 16 static PyObject * 17 _elementtree_Element_append(ElementObject *self, PyObject *arg) 18 { 19 PyObject *return_value = NULL; 20 PyObject *subelement; 21 22 if (!PyArg_Parse(arg, "O!:append", &Element_Type, &subelement)) { 23 goto exit; 24 } 25 return_value = _elementtree_Element_append_impl(self, subelement); 26 27 exit: 28 return return_value; 29 } 30 31 PyDoc_STRVAR(_elementtree_Element_clear__doc__, 32 "clear($self, /)\n" 33 "--\n" 34 "\n"); 35 36 #define _ELEMENTTREE_ELEMENT_CLEAR_METHODDEF \ 37 {"clear", (PyCFunction)_elementtree_Element_clear, METH_NOARGS, _elementtree_Element_clear__doc__}, 38 39 static PyObject * 40 _elementtree_Element_clear_impl(ElementObject *self); 41 42 static PyObject * 43 _elementtree_Element_clear(ElementObject *self, PyObject *Py_UNUSED(ignored)) 44 { 45 return _elementtree_Element_clear_impl(self); 46 } 47 48 PyDoc_STRVAR(_elementtree_Element___copy____doc__, 49 "__copy__($self, /)\n" 50 "--\n" 51 "\n"); 52 53 #define _ELEMENTTREE_ELEMENT___COPY___METHODDEF \ 54 {"__copy__", (PyCFunction)_elementtree_Element___copy__, METH_NOARGS, _elementtree_Element___copy____doc__}, 55 56 static PyObject * 57 _elementtree_Element___copy___impl(ElementObject *self); 58 59 static PyObject * 60 _elementtree_Element___copy__(ElementObject *self, PyObject *Py_UNUSED(ignored)) 61 { 62 return _elementtree_Element___copy___impl(self); 63 } 64 65 PyDoc_STRVAR(_elementtree_Element___deepcopy____doc__, 66 "__deepcopy__($self, memo, /)\n" 67 "--\n" 68 "\n"); 69 70 #define _ELEMENTTREE_ELEMENT___DEEPCOPY___METHODDEF \ 71 {"__deepcopy__", (PyCFunction)_elementtree_Element___deepcopy__, METH_O, _elementtree_Element___deepcopy____doc__}, 72 73 static PyObject * 74 _elementtree_Element___deepcopy___impl(ElementObject *self, PyObject *memo); 75 76 static PyObject * 77 _elementtree_Element___deepcopy__(ElementObject *self, PyObject *arg) 78 { 79 PyObject *return_value = NULL; 80 PyObject *memo; 81 82 if (!PyArg_Parse(arg, "O!:__deepcopy__", &PyDict_Type, &memo)) { 83 goto exit; 84 } 85 return_value = _elementtree_Element___deepcopy___impl(self, memo); 86 87 exit: 88 return return_value; 89 } 90 91 PyDoc_STRVAR(_elementtree_Element___sizeof____doc__, 92 "__sizeof__($self, /)\n" 93 "--\n" 94 "\n"); 95 96 #define _ELEMENTTREE_ELEMENT___SIZEOF___METHODDEF \ 97 {"__sizeof__", (PyCFunction)_elementtree_Element___sizeof__, METH_NOARGS, _elementtree_Element___sizeof____doc__}, 98 99 static Py_ssize_t 100 _elementtree_Element___sizeof___impl(ElementObject *self); 101 102 static PyObject * 103 _elementtree_Element___sizeof__(ElementObject *self, PyObject *Py_UNUSED(ignored)) 104 { 105 PyObject *return_value = NULL; 106 Py_ssize_t _return_value; 107 108 _return_value = _elementtree_Element___sizeof___impl(self); 109 if ((_return_value == -1) && PyErr_Occurred()) { 110 goto exit; 111 } 112 return_value = PyLong_FromSsize_t(_return_value); 113 114 exit: 115 return return_value; 116 } 117 118 PyDoc_STRVAR(_elementtree_Element___getstate____doc__, 119 "__getstate__($self, /)\n" 120 "--\n" 121 "\n"); 122 123 #define _ELEMENTTREE_ELEMENT___GETSTATE___METHODDEF \ 124 {"__getstate__", (PyCFunction)_elementtree_Element___getstate__, METH_NOARGS, _elementtree_Element___getstate____doc__}, 125 126 static PyObject * 127 _elementtree_Element___getstate___impl(ElementObject *self); 128 129 static PyObject * 130 _elementtree_Element___getstate__(ElementObject *self, PyObject *Py_UNUSED(ignored)) 131 { 132 return _elementtree_Element___getstate___impl(self); 133 } 134 135 PyDoc_STRVAR(_elementtree_Element___setstate____doc__, 136 "__setstate__($self, state, /)\n" 137 "--\n" 138 "\n"); 139 140 #define _ELEMENTTREE_ELEMENT___SETSTATE___METHODDEF \ 141 {"__setstate__", (PyCFunction)_elementtree_Element___setstate__, METH_O, _elementtree_Element___setstate____doc__}, 142 143 PyDoc_STRVAR(_elementtree_Element_extend__doc__, 144 "extend($self, elements, /)\n" 145 "--\n" 146 "\n"); 147 148 #define _ELEMENTTREE_ELEMENT_EXTEND_METHODDEF \ 149 {"extend", (PyCFunction)_elementtree_Element_extend, METH_O, _elementtree_Element_extend__doc__}, 150 151 PyDoc_STRVAR(_elementtree_Element_find__doc__, 152 "find($self, /, path, namespaces=None)\n" 153 "--\n" 154 "\n"); 155 156 #define _ELEMENTTREE_ELEMENT_FIND_METHODDEF \ 157 {"find", (PyCFunction)_elementtree_Element_find, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_find__doc__}, 158 159 static PyObject * 160 _elementtree_Element_find_impl(ElementObject *self, PyObject *path, 161 PyObject *namespaces); 162 163 static PyObject * 164 _elementtree_Element_find(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) 165 { 166 PyObject *return_value = NULL; 167 static const char * const _keywords[] = {"path", "namespaces", NULL}; 168 static _PyArg_Parser _parser = {"O|O:find", _keywords, 0}; 169 PyObject *path; 170 PyObject *namespaces = Py_None; 171 172 if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, 173 &path, &namespaces)) { 174 goto exit; 175 } 176 return_value = _elementtree_Element_find_impl(self, path, namespaces); 177 178 exit: 179 return return_value; 180 } 181 182 PyDoc_STRVAR(_elementtree_Element_findtext__doc__, 183 "findtext($self, /, path, default=None, namespaces=None)\n" 184 "--\n" 185 "\n"); 186 187 #define _ELEMENTTREE_ELEMENT_FINDTEXT_METHODDEF \ 188 {"findtext", (PyCFunction)_elementtree_Element_findtext, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_findtext__doc__}, 189 190 static PyObject * 191 _elementtree_Element_findtext_impl(ElementObject *self, PyObject *path, 192 PyObject *default_value, 193 PyObject *namespaces); 194 195 static PyObject * 196 _elementtree_Element_findtext(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) 197 { 198 PyObject *return_value = NULL; 199 static const char * const _keywords[] = {"path", "default", "namespaces", NULL}; 200 static _PyArg_Parser _parser = {"O|OO:findtext", _keywords, 0}; 201 PyObject *path; 202 PyObject *default_value = Py_None; 203 PyObject *namespaces = Py_None; 204 205 if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, 206 &path, &default_value, &namespaces)) { 207 goto exit; 208 } 209 return_value = _elementtree_Element_findtext_impl(self, path, default_value, namespaces); 210 211 exit: 212 return return_value; 213 } 214 215 PyDoc_STRVAR(_elementtree_Element_findall__doc__, 216 "findall($self, /, path, namespaces=None)\n" 217 "--\n" 218 "\n"); 219 220 #define _ELEMENTTREE_ELEMENT_FINDALL_METHODDEF \ 221 {"findall", (PyCFunction)_elementtree_Element_findall, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_findall__doc__}, 222 223 static PyObject * 224 _elementtree_Element_findall_impl(ElementObject *self, PyObject *path, 225 PyObject *namespaces); 226 227 static PyObject * 228 _elementtree_Element_findall(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) 229 { 230 PyObject *return_value = NULL; 231 static const char * const _keywords[] = {"path", "namespaces", NULL}; 232 static _PyArg_Parser _parser = {"O|O:findall", _keywords, 0}; 233 PyObject *path; 234 PyObject *namespaces = Py_None; 235 236 if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, 237 &path, &namespaces)) { 238 goto exit; 239 } 240 return_value = _elementtree_Element_findall_impl(self, path, namespaces); 241 242 exit: 243 return return_value; 244 } 245 246 PyDoc_STRVAR(_elementtree_Element_iterfind__doc__, 247 "iterfind($self, /, path, namespaces=None)\n" 248 "--\n" 249 "\n"); 250 251 #define _ELEMENTTREE_ELEMENT_ITERFIND_METHODDEF \ 252 {"iterfind", (PyCFunction)_elementtree_Element_iterfind, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_iterfind__doc__}, 253 254 static PyObject * 255 _elementtree_Element_iterfind_impl(ElementObject *self, PyObject *path, 256 PyObject *namespaces); 257 258 static PyObject * 259 _elementtree_Element_iterfind(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) 260 { 261 PyObject *return_value = NULL; 262 static const char * const _keywords[] = {"path", "namespaces", NULL}; 263 static _PyArg_Parser _parser = {"O|O:iterfind", _keywords, 0}; 264 PyObject *path; 265 PyObject *namespaces = Py_None; 266 267 if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, 268 &path, &namespaces)) { 269 goto exit; 270 } 271 return_value = _elementtree_Element_iterfind_impl(self, path, namespaces); 272 273 exit: 274 return return_value; 275 } 276 277 PyDoc_STRVAR(_elementtree_Element_get__doc__, 278 "get($self, /, key, default=None)\n" 279 "--\n" 280 "\n"); 281 282 #define _ELEMENTTREE_ELEMENT_GET_METHODDEF \ 283 {"get", (PyCFunction)_elementtree_Element_get, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_get__doc__}, 284 285 static PyObject * 286 _elementtree_Element_get_impl(ElementObject *self, PyObject *key, 287 PyObject *default_value); 288 289 static PyObject * 290 _elementtree_Element_get(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) 291 { 292 PyObject *return_value = NULL; 293 static const char * const _keywords[] = {"key", "default", NULL}; 294 static _PyArg_Parser _parser = {"O|O:get", _keywords, 0}; 295 PyObject *key; 296 PyObject *default_value = Py_None; 297 298 if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, 299 &key, &default_value)) { 300 goto exit; 301 } 302 return_value = _elementtree_Element_get_impl(self, key, default_value); 303 304 exit: 305 return return_value; 306 } 307 308 PyDoc_STRVAR(_elementtree_Element_getchildren__doc__, 309 "getchildren($self, /)\n" 310 "--\n" 311 "\n"); 312 313 #define _ELEMENTTREE_ELEMENT_GETCHILDREN_METHODDEF \ 314 {"getchildren", (PyCFunction)_elementtree_Element_getchildren, METH_NOARGS, _elementtree_Element_getchildren__doc__}, 315 316 static PyObject * 317 _elementtree_Element_getchildren_impl(ElementObject *self); 318 319 static PyObject * 320 _elementtree_Element_getchildren(ElementObject *self, PyObject *Py_UNUSED(ignored)) 321 { 322 return _elementtree_Element_getchildren_impl(self); 323 } 324 325 PyDoc_STRVAR(_elementtree_Element_iter__doc__, 326 "iter($self, /, tag=None)\n" 327 "--\n" 328 "\n"); 329 330 #define _ELEMENTTREE_ELEMENT_ITER_METHODDEF \ 331 {"iter", (PyCFunction)_elementtree_Element_iter, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_iter__doc__}, 332 333 static PyObject * 334 _elementtree_Element_iter_impl(ElementObject *self, PyObject *tag); 335 336 static PyObject * 337 _elementtree_Element_iter(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) 338 { 339 PyObject *return_value = NULL; 340 static const char * const _keywords[] = {"tag", NULL}; 341 static _PyArg_Parser _parser = {"|O:iter", _keywords, 0}; 342 PyObject *tag = Py_None; 343 344 if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, 345 &tag)) { 346 goto exit; 347 } 348 return_value = _elementtree_Element_iter_impl(self, tag); 349 350 exit: 351 return return_value; 352 } 353 354 PyDoc_STRVAR(_elementtree_Element_getiterator__doc__, 355 "getiterator($self, /, tag=None)\n" 356 "--\n" 357 "\n"); 358 359 #define _ELEMENTTREE_ELEMENT_GETITERATOR_METHODDEF \ 360 {"getiterator", (PyCFunction)_elementtree_Element_getiterator, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_getiterator__doc__}, 361 362 static PyObject * 363 _elementtree_Element_getiterator_impl(ElementObject *self, PyObject *tag); 364 365 static PyObject * 366 _elementtree_Element_getiterator(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) 367 { 368 PyObject *return_value = NULL; 369 static const char * const _keywords[] = {"tag", NULL}; 370 static _PyArg_Parser _parser = {"|O:getiterator", _keywords, 0}; 371 PyObject *tag = Py_None; 372 373 if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, 374 &tag)) { 375 goto exit; 376 } 377 return_value = _elementtree_Element_getiterator_impl(self, tag); 378 379 exit: 380 return return_value; 381 } 382 383 PyDoc_STRVAR(_elementtree_Element_itertext__doc__, 384 "itertext($self, /)\n" 385 "--\n" 386 "\n"); 387 388 #define _ELEMENTTREE_ELEMENT_ITERTEXT_METHODDEF \ 389 {"itertext", (PyCFunction)_elementtree_Element_itertext, METH_NOARGS, _elementtree_Element_itertext__doc__}, 390 391 static PyObject * 392 _elementtree_Element_itertext_impl(ElementObject *self); 393 394 static PyObject * 395 _elementtree_Element_itertext(ElementObject *self, PyObject *Py_UNUSED(ignored)) 396 { 397 return _elementtree_Element_itertext_impl(self); 398 } 399 400 PyDoc_STRVAR(_elementtree_Element_insert__doc__, 401 "insert($self, index, subelement, /)\n" 402 "--\n" 403 "\n"); 404 405 #define _ELEMENTTREE_ELEMENT_INSERT_METHODDEF \ 406 {"insert", (PyCFunction)_elementtree_Element_insert, METH_FASTCALL, _elementtree_Element_insert__doc__}, 407 408 static PyObject * 409 _elementtree_Element_insert_impl(ElementObject *self, Py_ssize_t index, 410 PyObject *subelement); 411 412 static PyObject * 413 _elementtree_Element_insert(ElementObject *self, PyObject *const *args, Py_ssize_t nargs) 414 { 415 PyObject *return_value = NULL; 416 Py_ssize_t index; 417 PyObject *subelement; 418 419 if (!_PyArg_ParseStack(args, nargs, "nO!:insert", 420 &index, &Element_Type, &subelement)) { 421 goto exit; 422 } 423 return_value = _elementtree_Element_insert_impl(self, index, subelement); 424 425 exit: 426 return return_value; 427 } 428 429 PyDoc_STRVAR(_elementtree_Element_items__doc__, 430 "items($self, /)\n" 431 "--\n" 432 "\n"); 433 434 #define _ELEMENTTREE_ELEMENT_ITEMS_METHODDEF \ 435 {"items", (PyCFunction)_elementtree_Element_items, METH_NOARGS, _elementtree_Element_items__doc__}, 436 437 static PyObject * 438 _elementtree_Element_items_impl(ElementObject *self); 439 440 static PyObject * 441 _elementtree_Element_items(ElementObject *self, PyObject *Py_UNUSED(ignored)) 442 { 443 return _elementtree_Element_items_impl(self); 444 } 445 446 PyDoc_STRVAR(_elementtree_Element_keys__doc__, 447 "keys($self, /)\n" 448 "--\n" 449 "\n"); 450 451 #define _ELEMENTTREE_ELEMENT_KEYS_METHODDEF \ 452 {"keys", (PyCFunction)_elementtree_Element_keys, METH_NOARGS, _elementtree_Element_keys__doc__}, 453 454 static PyObject * 455 _elementtree_Element_keys_impl(ElementObject *self); 456 457 static PyObject * 458 _elementtree_Element_keys(ElementObject *self, PyObject *Py_UNUSED(ignored)) 459 { 460 return _elementtree_Element_keys_impl(self); 461 } 462 463 PyDoc_STRVAR(_elementtree_Element_makeelement__doc__, 464 "makeelement($self, tag, attrib, /)\n" 465 "--\n" 466 "\n"); 467 468 #define _ELEMENTTREE_ELEMENT_MAKEELEMENT_METHODDEF \ 469 {"makeelement", (PyCFunction)_elementtree_Element_makeelement, METH_FASTCALL, _elementtree_Element_makeelement__doc__}, 470 471 static PyObject * 472 _elementtree_Element_makeelement_impl(ElementObject *self, PyObject *tag, 473 PyObject *attrib); 474 475 static PyObject * 476 _elementtree_Element_makeelement(ElementObject *self, PyObject *const *args, Py_ssize_t nargs) 477 { 478 PyObject *return_value = NULL; 479 PyObject *tag; 480 PyObject *attrib; 481 482 if (!_PyArg_UnpackStack(args, nargs, "makeelement", 483 2, 2, 484 &tag, &attrib)) { 485 goto exit; 486 } 487 return_value = _elementtree_Element_makeelement_impl(self, tag, attrib); 488 489 exit: 490 return return_value; 491 } 492 493 PyDoc_STRVAR(_elementtree_Element_remove__doc__, 494 "remove($self, subelement, /)\n" 495 "--\n" 496 "\n"); 497 498 #define _ELEMENTTREE_ELEMENT_REMOVE_METHODDEF \ 499 {"remove", (PyCFunction)_elementtree_Element_remove, METH_O, _elementtree_Element_remove__doc__}, 500 501 static PyObject * 502 _elementtree_Element_remove_impl(ElementObject *self, PyObject *subelement); 503 504 static PyObject * 505 _elementtree_Element_remove(ElementObject *self, PyObject *arg) 506 { 507 PyObject *return_value = NULL; 508 PyObject *subelement; 509 510 if (!PyArg_Parse(arg, "O!:remove", &Element_Type, &subelement)) { 511 goto exit; 512 } 513 return_value = _elementtree_Element_remove_impl(self, subelement); 514 515 exit: 516 return return_value; 517 } 518 519 PyDoc_STRVAR(_elementtree_Element_set__doc__, 520 "set($self, key, value, /)\n" 521 "--\n" 522 "\n"); 523 524 #define _ELEMENTTREE_ELEMENT_SET_METHODDEF \ 525 {"set", (PyCFunction)_elementtree_Element_set, METH_FASTCALL, _elementtree_Element_set__doc__}, 526 527 static PyObject * 528 _elementtree_Element_set_impl(ElementObject *self, PyObject *key, 529 PyObject *value); 530 531 static PyObject * 532 _elementtree_Element_set(ElementObject *self, PyObject *const *args, Py_ssize_t nargs) 533 { 534 PyObject *return_value = NULL; 535 PyObject *key; 536 PyObject *value; 537 538 if (!_PyArg_UnpackStack(args, nargs, "set", 539 2, 2, 540 &key, &value)) { 541 goto exit; 542 } 543 return_value = _elementtree_Element_set_impl(self, key, value); 544 545 exit: 546 return return_value; 547 } 548 549 static int 550 _elementtree_TreeBuilder___init___impl(TreeBuilderObject *self, 551 PyObject *element_factory); 552 553 static int 554 _elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwargs) 555 { 556 int return_value = -1; 557 static const char * const _keywords[] = {"element_factory", NULL}; 558 static _PyArg_Parser _parser = {"|O:TreeBuilder", _keywords, 0}; 559 PyObject *element_factory = NULL; 560 561 if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser, 562 &element_factory)) { 563 goto exit; 564 } 565 return_value = _elementtree_TreeBuilder___init___impl((TreeBuilderObject *)self, element_factory); 566 567 exit: 568 return return_value; 569 } 570 571 PyDoc_STRVAR(_elementtree_TreeBuilder_data__doc__, 572 "data($self, data, /)\n" 573 "--\n" 574 "\n"); 575 576 #define _ELEMENTTREE_TREEBUILDER_DATA_METHODDEF \ 577 {"data", (PyCFunction)_elementtree_TreeBuilder_data, METH_O, _elementtree_TreeBuilder_data__doc__}, 578 579 PyDoc_STRVAR(_elementtree_TreeBuilder_end__doc__, 580 "end($self, tag, /)\n" 581 "--\n" 582 "\n"); 583 584 #define _ELEMENTTREE_TREEBUILDER_END_METHODDEF \ 585 {"end", (PyCFunction)_elementtree_TreeBuilder_end, METH_O, _elementtree_TreeBuilder_end__doc__}, 586 587 PyDoc_STRVAR(_elementtree_TreeBuilder_close__doc__, 588 "close($self, /)\n" 589 "--\n" 590 "\n"); 591 592 #define _ELEMENTTREE_TREEBUILDER_CLOSE_METHODDEF \ 593 {"close", (PyCFunction)_elementtree_TreeBuilder_close, METH_NOARGS, _elementtree_TreeBuilder_close__doc__}, 594 595 static PyObject * 596 _elementtree_TreeBuilder_close_impl(TreeBuilderObject *self); 597 598 static PyObject * 599 _elementtree_TreeBuilder_close(TreeBuilderObject *self, PyObject *Py_UNUSED(ignored)) 600 { 601 return _elementtree_TreeBuilder_close_impl(self); 602 } 603 604 PyDoc_STRVAR(_elementtree_TreeBuilder_start__doc__, 605 "start($self, tag, attrs=None, /)\n" 606 "--\n" 607 "\n"); 608 609 #define _ELEMENTTREE_TREEBUILDER_START_METHODDEF \ 610 {"start", (PyCFunction)_elementtree_TreeBuilder_start, METH_FASTCALL, _elementtree_TreeBuilder_start__doc__}, 611 612 static PyObject * 613 _elementtree_TreeBuilder_start_impl(TreeBuilderObject *self, PyObject *tag, 614 PyObject *attrs); 615 616 static PyObject * 617 _elementtree_TreeBuilder_start(TreeBuilderObject *self, PyObject *const *args, Py_ssize_t nargs) 618 { 619 PyObject *return_value = NULL; 620 PyObject *tag; 621 PyObject *attrs = Py_None; 622 623 if (!_PyArg_UnpackStack(args, nargs, "start", 624 1, 2, 625 &tag, &attrs)) { 626 goto exit; 627 } 628 return_value = _elementtree_TreeBuilder_start_impl(self, tag, attrs); 629 630 exit: 631 return return_value; 632 } 633 634 static int 635 _elementtree_XMLParser___init___impl(XMLParserObject *self, PyObject *html, 636 PyObject *target, const char *encoding); 637 638 static int 639 _elementtree_XMLParser___init__(PyObject *self, PyObject *args, PyObject *kwargs) 640 { 641 int return_value = -1; 642 static const char * const _keywords[] = {"html", "target", "encoding", NULL}; 643 static _PyArg_Parser _parser = {"|OOz:XMLParser", _keywords, 0}; 644 PyObject *html = NULL; 645 PyObject *target = NULL; 646 const char *encoding = NULL; 647 648 if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser, 649 &html, &target, &encoding)) { 650 goto exit; 651 } 652 return_value = _elementtree_XMLParser___init___impl((XMLParserObject *)self, html, target, encoding); 653 654 exit: 655 return return_value; 656 } 657 658 PyDoc_STRVAR(_elementtree_XMLParser_close__doc__, 659 "close($self, /)\n" 660 "--\n" 661 "\n"); 662 663 #define _ELEMENTTREE_XMLPARSER_CLOSE_METHODDEF \ 664 {"close", (PyCFunction)_elementtree_XMLParser_close, METH_NOARGS, _elementtree_XMLParser_close__doc__}, 665 666 static PyObject * 667 _elementtree_XMLParser_close_impl(XMLParserObject *self); 668 669 static PyObject * 670 _elementtree_XMLParser_close(XMLParserObject *self, PyObject *Py_UNUSED(ignored)) 671 { 672 return _elementtree_XMLParser_close_impl(self); 673 } 674 675 PyDoc_STRVAR(_elementtree_XMLParser_feed__doc__, 676 "feed($self, data, /)\n" 677 "--\n" 678 "\n"); 679 680 #define _ELEMENTTREE_XMLPARSER_FEED_METHODDEF \ 681 {"feed", (PyCFunction)_elementtree_XMLParser_feed, METH_O, _elementtree_XMLParser_feed__doc__}, 682 683 PyDoc_STRVAR(_elementtree_XMLParser__parse_whole__doc__, 684 "_parse_whole($self, file, /)\n" 685 "--\n" 686 "\n"); 687 688 #define _ELEMENTTREE_XMLPARSER__PARSE_WHOLE_METHODDEF \ 689 {"_parse_whole", (PyCFunction)_elementtree_XMLParser__parse_whole, METH_O, _elementtree_XMLParser__parse_whole__doc__}, 690 691 PyDoc_STRVAR(_elementtree_XMLParser_doctype__doc__, 692 "doctype($self, name, pubid, system, /)\n" 693 "--\n" 694 "\n"); 695 696 #define _ELEMENTTREE_XMLPARSER_DOCTYPE_METHODDEF \ 697 {"doctype", (PyCFunction)_elementtree_XMLParser_doctype, METH_FASTCALL, _elementtree_XMLParser_doctype__doc__}, 698 699 static PyObject * 700 _elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name, 701 PyObject *pubid, PyObject *system); 702 703 static PyObject * 704 _elementtree_XMLParser_doctype(XMLParserObject *self, PyObject *const *args, Py_ssize_t nargs) 705 { 706 PyObject *return_value = NULL; 707 PyObject *name; 708 PyObject *pubid; 709 PyObject *system; 710 711 if (!_PyArg_UnpackStack(args, nargs, "doctype", 712 3, 3, 713 &name, &pubid, &system)) { 714 goto exit; 715 } 716 return_value = _elementtree_XMLParser_doctype_impl(self, name, pubid, system); 717 718 exit: 719 return return_value; 720 } 721 722 PyDoc_STRVAR(_elementtree_XMLParser__setevents__doc__, 723 "_setevents($self, events_queue, events_to_report=None, /)\n" 724 "--\n" 725 "\n"); 726 727 #define _ELEMENTTREE_XMLPARSER__SETEVENTS_METHODDEF \ 728 {"_setevents", (PyCFunction)_elementtree_XMLParser__setevents, METH_FASTCALL, _elementtree_XMLParser__setevents__doc__}, 729 730 static PyObject * 731 _elementtree_XMLParser__setevents_impl(XMLParserObject *self, 732 PyObject *events_queue, 733 PyObject *events_to_report); 734 735 static PyObject * 736 _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *const *args, Py_ssize_t nargs) 737 { 738 PyObject *return_value = NULL; 739 PyObject *events_queue; 740 PyObject *events_to_report = Py_None; 741 742 if (!_PyArg_UnpackStack(args, nargs, "_setevents", 743 1, 2, 744 &events_queue, &events_to_report)) { 745 goto exit; 746 } 747 return_value = _elementtree_XMLParser__setevents_impl(self, events_queue, events_to_report); 748 749 exit: 750 return return_value; 751 } 752 /*[clinic end generated code: output=c5a85a88bbb5cc06 input=a9049054013a1b77]*/ 753