pyexpat.c.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. /*[clinic input]
  2. preserve
  3. [clinic start generated code]*/
  4. #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
  5. # include "pycore_gc.h" // PyGC_Head
  6. # include "pycore_runtime.h" // _Py_ID()
  7. #endif
  8. PyDoc_STRVAR(pyexpat_xmlparser_SetReparseDeferralEnabled__doc__,
  9. "SetReparseDeferralEnabled($self, enabled, /)\n"
  10. "--\n"
  11. "\n"
  12. "Enable/Disable reparse deferral; enabled by default with Expat >=2.6.0.");
  13. #define PYEXPAT_XMLPARSER_SETREPARSEDEFERRALENABLED_METHODDEF \
  14. {"SetReparseDeferralEnabled", (PyCFunction)pyexpat_xmlparser_SetReparseDeferralEnabled, METH_O, pyexpat_xmlparser_SetReparseDeferralEnabled__doc__},
  15. static PyObject *
  16. pyexpat_xmlparser_SetReparseDeferralEnabled_impl(xmlparseobject *self,
  17. int enabled);
  18. static PyObject *
  19. pyexpat_xmlparser_SetReparseDeferralEnabled(xmlparseobject *self, PyObject *arg)
  20. {
  21. PyObject *return_value = NULL;
  22. int enabled;
  23. enabled = PyObject_IsTrue(arg);
  24. if (enabled < 0) {
  25. goto exit;
  26. }
  27. return_value = pyexpat_xmlparser_SetReparseDeferralEnabled_impl(self, enabled);
  28. exit:
  29. return return_value;
  30. }
  31. PyDoc_STRVAR(pyexpat_xmlparser_GetReparseDeferralEnabled__doc__,
  32. "GetReparseDeferralEnabled($self, /)\n"
  33. "--\n"
  34. "\n"
  35. "Retrieve reparse deferral enabled status; always returns false with Expat <2.6.0.");
  36. #define PYEXPAT_XMLPARSER_GETREPARSEDEFERRALENABLED_METHODDEF \
  37. {"GetReparseDeferralEnabled", (PyCFunction)pyexpat_xmlparser_GetReparseDeferralEnabled, METH_NOARGS, pyexpat_xmlparser_GetReparseDeferralEnabled__doc__},
  38. static PyObject *
  39. pyexpat_xmlparser_GetReparseDeferralEnabled_impl(xmlparseobject *self);
  40. static PyObject *
  41. pyexpat_xmlparser_GetReparseDeferralEnabled(xmlparseobject *self, PyObject *Py_UNUSED(ignored))
  42. {
  43. return pyexpat_xmlparser_GetReparseDeferralEnabled_impl(self);
  44. }
  45. PyDoc_STRVAR(pyexpat_xmlparser_Parse__doc__,
  46. "Parse($self, data, isfinal=False, /)\n"
  47. "--\n"
  48. "\n"
  49. "Parse XML data.\n"
  50. "\n"
  51. "`isfinal\' should be true at end of input.");
  52. #define PYEXPAT_XMLPARSER_PARSE_METHODDEF \
  53. {"Parse", _PyCFunction_CAST(pyexpat_xmlparser_Parse), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, pyexpat_xmlparser_Parse__doc__},
  54. static PyObject *
  55. pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyTypeObject *cls,
  56. PyObject *data, int isfinal);
  57. static PyObject *
  58. pyexpat_xmlparser_Parse(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
  59. {
  60. PyObject *return_value = NULL;
  61. #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
  62. # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty)
  63. #else
  64. # define KWTUPLE NULL
  65. #endif
  66. static const char * const _keywords[] = {"", "", NULL};
  67. static _PyArg_Parser _parser = {
  68. .keywords = _keywords,
  69. .fname = "Parse",
  70. .kwtuple = KWTUPLE,
  71. };
  72. #undef KWTUPLE
  73. PyObject *argsbuf[2];
  74. PyObject *data;
  75. int isfinal = 0;
  76. args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
  77. if (!args) {
  78. goto exit;
  79. }
  80. data = args[0];
  81. if (nargs < 2) {
  82. goto skip_optional_posonly;
  83. }
  84. isfinal = PyObject_IsTrue(args[1]);
  85. if (isfinal < 0) {
  86. goto exit;
  87. }
  88. skip_optional_posonly:
  89. return_value = pyexpat_xmlparser_Parse_impl(self, cls, data, isfinal);
  90. exit:
  91. return return_value;
  92. }
  93. PyDoc_STRVAR(pyexpat_xmlparser_ParseFile__doc__,
  94. "ParseFile($self, file, /)\n"
  95. "--\n"
  96. "\n"
  97. "Parse XML data from file-like object.");
  98. #define PYEXPAT_XMLPARSER_PARSEFILE_METHODDEF \
  99. {"ParseFile", _PyCFunction_CAST(pyexpat_xmlparser_ParseFile), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, pyexpat_xmlparser_ParseFile__doc__},
  100. static PyObject *
  101. pyexpat_xmlparser_ParseFile_impl(xmlparseobject *self, PyTypeObject *cls,
  102. PyObject *file);
  103. static PyObject *
  104. pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
  105. {
  106. PyObject *return_value = NULL;
  107. #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
  108. # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty)
  109. #else
  110. # define KWTUPLE NULL
  111. #endif
  112. static const char * const _keywords[] = {"", NULL};
  113. static _PyArg_Parser _parser = {
  114. .keywords = _keywords,
  115. .fname = "ParseFile",
  116. .kwtuple = KWTUPLE,
  117. };
  118. #undef KWTUPLE
  119. PyObject *argsbuf[1];
  120. PyObject *file;
  121. args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
  122. if (!args) {
  123. goto exit;
  124. }
  125. file = args[0];
  126. return_value = pyexpat_xmlparser_ParseFile_impl(self, cls, file);
  127. exit:
  128. return return_value;
  129. }
  130. PyDoc_STRVAR(pyexpat_xmlparser_SetBase__doc__,
  131. "SetBase($self, base, /)\n"
  132. "--\n"
  133. "\n"
  134. "Set the base URL for the parser.");
  135. #define PYEXPAT_XMLPARSER_SETBASE_METHODDEF \
  136. {"SetBase", (PyCFunction)pyexpat_xmlparser_SetBase, METH_O, pyexpat_xmlparser_SetBase__doc__},
  137. static PyObject *
  138. pyexpat_xmlparser_SetBase_impl(xmlparseobject *self, const char *base);
  139. static PyObject *
  140. pyexpat_xmlparser_SetBase(xmlparseobject *self, PyObject *arg)
  141. {
  142. PyObject *return_value = NULL;
  143. const char *base;
  144. if (!PyUnicode_Check(arg)) {
  145. _PyArg_BadArgument("SetBase", "argument", "str", arg);
  146. goto exit;
  147. }
  148. Py_ssize_t base_length;
  149. base = PyUnicode_AsUTF8AndSize(arg, &base_length);
  150. if (base == NULL) {
  151. goto exit;
  152. }
  153. if (strlen(base) != (size_t)base_length) {
  154. PyErr_SetString(PyExc_ValueError, "embedded null character");
  155. goto exit;
  156. }
  157. return_value = pyexpat_xmlparser_SetBase_impl(self, base);
  158. exit:
  159. return return_value;
  160. }
  161. PyDoc_STRVAR(pyexpat_xmlparser_GetBase__doc__,
  162. "GetBase($self, /)\n"
  163. "--\n"
  164. "\n"
  165. "Return base URL string for the parser.");
  166. #define PYEXPAT_XMLPARSER_GETBASE_METHODDEF \
  167. {"GetBase", (PyCFunction)pyexpat_xmlparser_GetBase, METH_NOARGS, pyexpat_xmlparser_GetBase__doc__},
  168. static PyObject *
  169. pyexpat_xmlparser_GetBase_impl(xmlparseobject *self);
  170. static PyObject *
  171. pyexpat_xmlparser_GetBase(xmlparseobject *self, PyObject *Py_UNUSED(ignored))
  172. {
  173. return pyexpat_xmlparser_GetBase_impl(self);
  174. }
  175. PyDoc_STRVAR(pyexpat_xmlparser_GetInputContext__doc__,
  176. "GetInputContext($self, /)\n"
  177. "--\n"
  178. "\n"
  179. "Return the untranslated text of the input that caused the current event.\n"
  180. "\n"
  181. "If the event was generated by a large amount of text (such as a start tag\n"
  182. "for an element with many attributes), not all of the text may be available.");
  183. #define PYEXPAT_XMLPARSER_GETINPUTCONTEXT_METHODDEF \
  184. {"GetInputContext", (PyCFunction)pyexpat_xmlparser_GetInputContext, METH_NOARGS, pyexpat_xmlparser_GetInputContext__doc__},
  185. static PyObject *
  186. pyexpat_xmlparser_GetInputContext_impl(xmlparseobject *self);
  187. static PyObject *
  188. pyexpat_xmlparser_GetInputContext(xmlparseobject *self, PyObject *Py_UNUSED(ignored))
  189. {
  190. return pyexpat_xmlparser_GetInputContext_impl(self);
  191. }
  192. PyDoc_STRVAR(pyexpat_xmlparser_ExternalEntityParserCreate__doc__,
  193. "ExternalEntityParserCreate($self, context, encoding=<unrepresentable>,\n"
  194. " /)\n"
  195. "--\n"
  196. "\n"
  197. "Create a parser for parsing an external entity based on the information passed to the ExternalEntityRefHandler.");
  198. #define PYEXPAT_XMLPARSER_EXTERNALENTITYPARSERCREATE_METHODDEF \
  199. {"ExternalEntityParserCreate", _PyCFunction_CAST(pyexpat_xmlparser_ExternalEntityParserCreate), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, pyexpat_xmlparser_ExternalEntityParserCreate__doc__},
  200. static PyObject *
  201. pyexpat_xmlparser_ExternalEntityParserCreate_impl(xmlparseobject *self,
  202. PyTypeObject *cls,
  203. const char *context,
  204. const char *encoding);
  205. static PyObject *
  206. pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
  207. {
  208. PyObject *return_value = NULL;
  209. #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
  210. # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty)
  211. #else
  212. # define KWTUPLE NULL
  213. #endif
  214. static const char * const _keywords[] = {"", "", NULL};
  215. static _PyArg_Parser _parser = {
  216. .keywords = _keywords,
  217. .fname = "ExternalEntityParserCreate",
  218. .kwtuple = KWTUPLE,
  219. };
  220. #undef KWTUPLE
  221. PyObject *argsbuf[2];
  222. const char *context;
  223. const char *encoding = NULL;
  224. args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
  225. if (!args) {
  226. goto exit;
  227. }
  228. if (args[0] == Py_None) {
  229. context = NULL;
  230. }
  231. else if (PyUnicode_Check(args[0])) {
  232. Py_ssize_t context_length;
  233. context = PyUnicode_AsUTF8AndSize(args[0], &context_length);
  234. if (context == NULL) {
  235. goto exit;
  236. }
  237. if (strlen(context) != (size_t)context_length) {
  238. PyErr_SetString(PyExc_ValueError, "embedded null character");
  239. goto exit;
  240. }
  241. }
  242. else {
  243. _PyArg_BadArgument("ExternalEntityParserCreate", "argument 1", "str or None", args[0]);
  244. goto exit;
  245. }
  246. if (nargs < 2) {
  247. goto skip_optional_posonly;
  248. }
  249. if (!PyUnicode_Check(args[1])) {
  250. _PyArg_BadArgument("ExternalEntityParserCreate", "argument 2", "str", args[1]);
  251. goto exit;
  252. }
  253. Py_ssize_t encoding_length;
  254. encoding = PyUnicode_AsUTF8AndSize(args[1], &encoding_length);
  255. if (encoding == NULL) {
  256. goto exit;
  257. }
  258. if (strlen(encoding) != (size_t)encoding_length) {
  259. PyErr_SetString(PyExc_ValueError, "embedded null character");
  260. goto exit;
  261. }
  262. skip_optional_posonly:
  263. return_value = pyexpat_xmlparser_ExternalEntityParserCreate_impl(self, cls, context, encoding);
  264. exit:
  265. return return_value;
  266. }
  267. PyDoc_STRVAR(pyexpat_xmlparser_SetParamEntityParsing__doc__,
  268. "SetParamEntityParsing($self, flag, /)\n"
  269. "--\n"
  270. "\n"
  271. "Controls parsing of parameter entities (including the external DTD subset).\n"
  272. "\n"
  273. "Possible flag values are XML_PARAM_ENTITY_PARSING_NEVER,\n"
  274. "XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE and\n"
  275. "XML_PARAM_ENTITY_PARSING_ALWAYS. Returns true if setting the flag\n"
  276. "was successful.");
  277. #define PYEXPAT_XMLPARSER_SETPARAMENTITYPARSING_METHODDEF \
  278. {"SetParamEntityParsing", (PyCFunction)pyexpat_xmlparser_SetParamEntityParsing, METH_O, pyexpat_xmlparser_SetParamEntityParsing__doc__},
  279. static PyObject *
  280. pyexpat_xmlparser_SetParamEntityParsing_impl(xmlparseobject *self, int flag);
  281. static PyObject *
  282. pyexpat_xmlparser_SetParamEntityParsing(xmlparseobject *self, PyObject *arg)
  283. {
  284. PyObject *return_value = NULL;
  285. int flag;
  286. flag = _PyLong_AsInt(arg);
  287. if (flag == -1 && PyErr_Occurred()) {
  288. goto exit;
  289. }
  290. return_value = pyexpat_xmlparser_SetParamEntityParsing_impl(self, flag);
  291. exit:
  292. return return_value;
  293. }
  294. #if (XML_COMBINED_VERSION >= 19505)
  295. PyDoc_STRVAR(pyexpat_xmlparser_UseForeignDTD__doc__,
  296. "UseForeignDTD($self, flag=True, /)\n"
  297. "--\n"
  298. "\n"
  299. "Allows the application to provide an artificial external subset if one is not specified as part of the document instance.\n"
  300. "\n"
  301. "This readily allows the use of a \'default\' document type controlled by the\n"
  302. "application, while still getting the advantage of providing document type\n"
  303. "information to the parser. \'flag\' defaults to True if not provided.");
  304. #define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF \
  305. {"UseForeignDTD", _PyCFunction_CAST(pyexpat_xmlparser_UseForeignDTD), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, pyexpat_xmlparser_UseForeignDTD__doc__},
  306. static PyObject *
  307. pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, PyTypeObject *cls,
  308. int flag);
  309. static PyObject *
  310. pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
  311. {
  312. PyObject *return_value = NULL;
  313. #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
  314. # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty)
  315. #else
  316. # define KWTUPLE NULL
  317. #endif
  318. static const char * const _keywords[] = {"", NULL};
  319. static _PyArg_Parser _parser = {
  320. .keywords = _keywords,
  321. .fname = "UseForeignDTD",
  322. .kwtuple = KWTUPLE,
  323. };
  324. #undef KWTUPLE
  325. PyObject *argsbuf[1];
  326. int flag = 1;
  327. args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf);
  328. if (!args) {
  329. goto exit;
  330. }
  331. if (nargs < 1) {
  332. goto skip_optional_posonly;
  333. }
  334. flag = PyObject_IsTrue(args[0]);
  335. if (flag < 0) {
  336. goto exit;
  337. }
  338. skip_optional_posonly:
  339. return_value = pyexpat_xmlparser_UseForeignDTD_impl(self, cls, flag);
  340. exit:
  341. return return_value;
  342. }
  343. #endif /* (XML_COMBINED_VERSION >= 19505) */
  344. PyDoc_STRVAR(pyexpat_ParserCreate__doc__,
  345. "ParserCreate($module, /, encoding=None, namespace_separator=None,\n"
  346. " intern=<unrepresentable>)\n"
  347. "--\n"
  348. "\n"
  349. "Return a new XML parser object.");
  350. #define PYEXPAT_PARSERCREATE_METHODDEF \
  351. {"ParserCreate", _PyCFunction_CAST(pyexpat_ParserCreate), METH_FASTCALL|METH_KEYWORDS, pyexpat_ParserCreate__doc__},
  352. static PyObject *
  353. pyexpat_ParserCreate_impl(PyObject *module, const char *encoding,
  354. const char *namespace_separator, PyObject *intern);
  355. static PyObject *
  356. pyexpat_ParserCreate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
  357. {
  358. PyObject *return_value = NULL;
  359. #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
  360. #define NUM_KEYWORDS 3
  361. static struct {
  362. PyGC_Head _this_is_not_used;
  363. PyObject_VAR_HEAD
  364. PyObject *ob_item[NUM_KEYWORDS];
  365. } _kwtuple = {
  366. .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
  367. .ob_item = { &_Py_ID(encoding), &_Py_ID(namespace_separator), &_Py_ID(intern), },
  368. };
  369. #undef NUM_KEYWORDS
  370. #define KWTUPLE (&_kwtuple.ob_base.ob_base)
  371. #else // !Py_BUILD_CORE
  372. # define KWTUPLE NULL
  373. #endif // !Py_BUILD_CORE
  374. static const char * const _keywords[] = {"encoding", "namespace_separator", "intern", NULL};
  375. static _PyArg_Parser _parser = {
  376. .keywords = _keywords,
  377. .fname = "ParserCreate",
  378. .kwtuple = KWTUPLE,
  379. };
  380. #undef KWTUPLE
  381. PyObject *argsbuf[3];
  382. Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
  383. const char *encoding = NULL;
  384. const char *namespace_separator = NULL;
  385. PyObject *intern = NULL;
  386. args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf);
  387. if (!args) {
  388. goto exit;
  389. }
  390. if (!noptargs) {
  391. goto skip_optional_pos;
  392. }
  393. if (args[0]) {
  394. if (args[0] == Py_None) {
  395. encoding = NULL;
  396. }
  397. else if (PyUnicode_Check(args[0])) {
  398. Py_ssize_t encoding_length;
  399. encoding = PyUnicode_AsUTF8AndSize(args[0], &encoding_length);
  400. if (encoding == NULL) {
  401. goto exit;
  402. }
  403. if (strlen(encoding) != (size_t)encoding_length) {
  404. PyErr_SetString(PyExc_ValueError, "embedded null character");
  405. goto exit;
  406. }
  407. }
  408. else {
  409. _PyArg_BadArgument("ParserCreate", "argument 'encoding'", "str or None", args[0]);
  410. goto exit;
  411. }
  412. if (!--noptargs) {
  413. goto skip_optional_pos;
  414. }
  415. }
  416. if (args[1]) {
  417. if (args[1] == Py_None) {
  418. namespace_separator = NULL;
  419. }
  420. else if (PyUnicode_Check(args[1])) {
  421. Py_ssize_t namespace_separator_length;
  422. namespace_separator = PyUnicode_AsUTF8AndSize(args[1], &namespace_separator_length);
  423. if (namespace_separator == NULL) {
  424. goto exit;
  425. }
  426. if (strlen(namespace_separator) != (size_t)namespace_separator_length) {
  427. PyErr_SetString(PyExc_ValueError, "embedded null character");
  428. goto exit;
  429. }
  430. }
  431. else {
  432. _PyArg_BadArgument("ParserCreate", "argument 'namespace_separator'", "str or None", args[1]);
  433. goto exit;
  434. }
  435. if (!--noptargs) {
  436. goto skip_optional_pos;
  437. }
  438. }
  439. intern = args[2];
  440. skip_optional_pos:
  441. return_value = pyexpat_ParserCreate_impl(module, encoding, namespace_separator, intern);
  442. exit:
  443. return return_value;
  444. }
  445. PyDoc_STRVAR(pyexpat_ErrorString__doc__,
  446. "ErrorString($module, code, /)\n"
  447. "--\n"
  448. "\n"
  449. "Returns string error for given number.");
  450. #define PYEXPAT_ERRORSTRING_METHODDEF \
  451. {"ErrorString", (PyCFunction)pyexpat_ErrorString, METH_O, pyexpat_ErrorString__doc__},
  452. static PyObject *
  453. pyexpat_ErrorString_impl(PyObject *module, long code);
  454. static PyObject *
  455. pyexpat_ErrorString(PyObject *module, PyObject *arg)
  456. {
  457. PyObject *return_value = NULL;
  458. long code;
  459. code = PyLong_AsLong(arg);
  460. if (code == -1 && PyErr_Occurred()) {
  461. goto exit;
  462. }
  463. return_value = pyexpat_ErrorString_impl(module, code);
  464. exit:
  465. return return_value;
  466. }
  467. #ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
  468. #define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
  469. #endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */
  470. /*[clinic end generated code: output=8625852bb44a5e56 input=a9049054013a1b77]*/