mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 02:38:31 +00:00
Backport METH_FASTCALL from Python 3.7 (#328)
This commit is contained in:
parent
70c97f598b
commit
cf73bbd678
102 changed files with 2896 additions and 3301 deletions
22
third_party/python/Modules/clinic/pyexpat.inc
vendored
22
third_party/python/Modules/clinic/pyexpat.inc
vendored
|
@ -19,7 +19,7 @@ pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data,
|
|||
int isfinal);
|
||||
|
||||
static PyObject *
|
||||
pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *data;
|
||||
|
@ -29,10 +29,6 @@ pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject **args, Py_ssize_t nargs,
|
|||
&data, &isfinal)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("Parse", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = pyexpat_xmlparser_Parse_impl(self, data, isfinal);
|
||||
|
||||
exit:
|
||||
|
@ -129,7 +125,7 @@ pyexpat_xmlparser_ExternalEntityParserCreate_impl(xmlparseobject *self,
|
|||
const char *encoding);
|
||||
|
||||
static PyObject *
|
||||
pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
const char *context;
|
||||
|
@ -139,10 +135,6 @@ pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyObject **ar
|
|||
&context, &encoding)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("ExternalEntityParserCreate", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = pyexpat_xmlparser_ExternalEntityParserCreate_impl(self, context, encoding);
|
||||
|
||||
exit:
|
||||
|
@ -200,7 +192,7 @@ static PyObject *
|
|||
pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, int flag);
|
||||
|
||||
static PyObject *
|
||||
pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
int flag = 1;
|
||||
|
@ -209,10 +201,6 @@ pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyObject **args, Py_ssize_
|
|||
&flag)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("UseForeignDTD", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = pyexpat_xmlparser_UseForeignDTD_impl(self, flag);
|
||||
|
||||
exit:
|
||||
|
@ -246,7 +234,7 @@ PyDoc_STRVAR(pyexpat_ParserCreate__doc__,
|
|||
"Return a new XML parser object.");
|
||||
|
||||
#define PYEXPAT_PARSERCREATE_METHODDEF \
|
||||
{"ParserCreate", (PyCFunction)pyexpat_ParserCreate, METH_FASTCALL, pyexpat_ParserCreate__doc__},
|
||||
{"ParserCreate", (PyCFunction)pyexpat_ParserCreate, METH_FASTCALL|METH_KEYWORDS, pyexpat_ParserCreate__doc__},
|
||||
|
||||
static PyObject *
|
||||
pyexpat_ParserCreate_impl(PyObject *module, const char *encoding,
|
||||
|
@ -302,4 +290,4 @@ exit:
|
|||
#ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
|
||||
#define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
|
||||
#endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */
|
||||
/*[clinic end generated code: output=0548a6b12157e29b input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=5d2e355f2b48e6c3 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue