mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-29 08:42:28 +00:00
Python 3.7 METH_FASTCALL backport (#406)
This commit is contained in:
parent
fec396037a
commit
83b743cf96
103 changed files with 2949 additions and 3356 deletions
|
@ -98,7 +98,7 @@ static PyObject *
|
|||
_io__Buffered_peek_impl(buffered *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_peek(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io__Buffered_peek(buffered *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = 0;
|
||||
|
@ -107,10 +107,6 @@ _io__Buffered_peek(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *
|
|||
&size)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("peek", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io__Buffered_peek_impl(self, size);
|
||||
|
||||
exit:
|
||||
|
@ -129,7 +125,7 @@ static PyObject *
|
|||
_io__Buffered_read_impl(buffered *self, Py_ssize_t n);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_read(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io__Buffered_read(buffered *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t n = -1;
|
||||
|
@ -138,10 +134,6 @@ _io__Buffered_read(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *
|
|||
_PyIO_ConvertSsize_t, &n)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("read", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io__Buffered_read_impl(self, n);
|
||||
|
||||
exit:
|
||||
|
@ -248,7 +240,7 @@ static PyObject *
|
|||
_io__Buffered_readline_impl(buffered *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_readline(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io__Buffered_readline(buffered *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
@ -257,10 +249,6 @@ _io__Buffered_readline(buffered *self, PyObject **args, Py_ssize_t nargs, PyObje
|
|||
_PyIO_ConvertSsize_t, &size)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io__Buffered_readline_impl(self, size);
|
||||
|
||||
exit:
|
||||
|
@ -279,7 +267,7 @@ static PyObject *
|
|||
_io__Buffered_seek_impl(buffered *self, PyObject *targetobj, int whence);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_seek(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io__Buffered_seek(buffered *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *targetobj;
|
||||
|
@ -289,10 +277,6 @@ _io__Buffered_seek(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *
|
|||
&targetobj, &whence)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("seek", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io__Buffered_seek_impl(self, targetobj, whence);
|
||||
|
||||
exit:
|
||||
|
@ -311,7 +295,7 @@ static PyObject *
|
|||
_io__Buffered_truncate_impl(buffered *self, PyObject *pos);
|
||||
|
||||
static PyObject *
|
||||
_io__Buffered_truncate(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io__Buffered_truncate(buffered *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *pos = Py_None;
|
||||
|
@ -321,10 +305,6 @@ _io__Buffered_truncate(buffered *self, PyObject **args, Py_ssize_t nargs, PyObje
|
|||
&pos)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io__Buffered_truncate_impl(self, pos);
|
||||
|
||||
exit:
|
||||
|
@ -496,4 +476,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=c526190c51a616c8 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=5239e4eaff6306f3 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue