mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-25 23:02: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
|
@ -165,7 +165,7 @@ static PyObject *
|
|||
_io_BytesIO_read_impl(bytesio *self, PyObject *arg);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_read(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_BytesIO_read(bytesio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *arg = Py_None;
|
||||
|
@ -175,10 +175,6 @@ _io_BytesIO_read(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwn
|
|||
&arg)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("read", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_BytesIO_read_impl(self, arg);
|
||||
|
||||
exit:
|
||||
|
@ -214,7 +210,7 @@ static PyObject *
|
|||
_io_BytesIO_readline_impl(bytesio *self, PyObject *arg);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_readline(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_BytesIO_readline(bytesio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *arg = Py_None;
|
||||
|
@ -224,10 +220,6 @@ _io_BytesIO_readline(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject
|
|||
&arg)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_BytesIO_readline_impl(self, arg);
|
||||
|
||||
exit:
|
||||
|
@ -251,7 +243,7 @@ static PyObject *
|
|||
_io_BytesIO_readlines_impl(bytesio *self, PyObject *arg);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_readlines(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_BytesIO_readlines(bytesio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *arg = Py_None;
|
||||
|
@ -261,10 +253,6 @@ _io_BytesIO_readlines(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject
|
|||
&arg)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("readlines", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_BytesIO_readlines_impl(self, arg);
|
||||
|
||||
exit:
|
||||
|
@ -322,7 +310,7 @@ static PyObject *
|
|||
_io_BytesIO_truncate_impl(bytesio *self, PyObject *arg);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_truncate(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_BytesIO_truncate(bytesio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *arg = Py_None;
|
||||
|
@ -332,10 +320,6 @@ _io_BytesIO_truncate(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject
|
|||
&arg)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_BytesIO_truncate_impl(self, arg);
|
||||
|
||||
exit:
|
||||
|
@ -361,7 +345,7 @@ static PyObject *
|
|||
_io_BytesIO_seek_impl(bytesio *self, Py_ssize_t pos, int whence);
|
||||
|
||||
static PyObject *
|
||||
_io_BytesIO_seek(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_BytesIO_seek(bytesio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t pos;
|
||||
|
@ -371,10 +355,6 @@ _io_BytesIO_seek(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwn
|
|||
&pos, &whence)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("seek", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_BytesIO_seek_impl(self, pos, whence);
|
||||
|
||||
exit:
|
||||
|
@ -449,4 +429,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=08139186b009ec47 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=c8184aac612e063e input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue