mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-31 09:42:27 +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
|
@ -72,7 +72,7 @@ static PyObject *
|
|||
array_array_pop_impl(arrayobject *self, Py_ssize_t i);
|
||||
|
||||
static PyObject *
|
||||
array_array_pop(arrayobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
array_array_pop(arrayobject *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t i = -1;
|
||||
|
@ -81,10 +81,6 @@ array_array_pop(arrayobject *self, PyObject **args, Py_ssize_t nargs, PyObject *
|
|||
&i)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("pop", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = array_array_pop_impl(self, i);
|
||||
|
||||
exit:
|
||||
|
@ -113,7 +109,7 @@ static PyObject *
|
|||
array_array_insert_impl(arrayobject *self, Py_ssize_t i, PyObject *v);
|
||||
|
||||
static PyObject *
|
||||
array_array_insert(arrayobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
array_array_insert(arrayobject *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t i;
|
||||
|
@ -123,10 +119,6 @@ array_array_insert(arrayobject *self, PyObject **args, Py_ssize_t nargs, PyObjec
|
|||
&i, &v)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("insert", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = array_array_insert_impl(self, i, v);
|
||||
|
||||
exit:
|
||||
|
@ -215,7 +207,7 @@ static PyObject *
|
|||
array_array_fromfile_impl(arrayobject *self, PyObject *f, Py_ssize_t n);
|
||||
|
||||
static PyObject *
|
||||
array_array_fromfile(arrayobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
array_array_fromfile(arrayobject *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *f;
|
||||
|
@ -225,10 +217,6 @@ array_array_fromfile(arrayobject *self, PyObject **args, Py_ssize_t nargs, PyObj
|
|||
&f, &n)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("fromfile", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = array_array_fromfile_impl(self, f, n);
|
||||
|
||||
exit:
|
||||
|
@ -465,7 +453,7 @@ array__array_reconstructor_impl(PyObject *module, PyTypeObject *arraytype,
|
|||
PyObject *items);
|
||||
|
||||
static PyObject *
|
||||
array__array_reconstructor(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
array__array_reconstructor(PyObject *module, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyTypeObject *arraytype;
|
||||
|
@ -477,10 +465,6 @@ array__array_reconstructor(PyObject *module, PyObject **args, Py_ssize_t nargs,
|
|||
&arraytype, &typecode, &mformat_code, &items)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("_array_reconstructor", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = array__array_reconstructor_impl(module, arraytype, typecode, mformat_code, items);
|
||||
|
||||
exit:
|
||||
|
@ -522,4 +506,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
|
|||
|
||||
#define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
|
||||
{"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
|
||||
/*[clinic end generated code: output=d186a7553c1f1a41 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=c7dfe61312b236a9 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue