mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-25 23:02:27 +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
20
third_party/python/Modules/_io/clinic/fileio.inc
vendored
20
third_party/python/Modules/_io/clinic/fileio.inc
vendored
|
@ -209,7 +209,7 @@ static PyObject *
|
|||
_io_FileIO_read_impl(fileio *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_read(fileio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_FileIO_read(fileio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
@ -218,10 +218,6 @@ _io_FileIO_read(fileio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnam
|
|||
_PyIO_ConvertSsize_t, &size)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("read", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_FileIO_read_impl(self, size);
|
||||
|
||||
exit:
|
||||
|
@ -285,7 +281,7 @@ static PyObject *
|
|||
_io_FileIO_seek_impl(fileio *self, PyObject *pos, int whence);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_seek(fileio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_FileIO_seek(fileio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *pos;
|
||||
|
@ -295,10 +291,6 @@ _io_FileIO_seek(fileio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnam
|
|||
&pos, &whence)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("seek", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_FileIO_seek_impl(self, pos, whence);
|
||||
|
||||
exit:
|
||||
|
@ -343,7 +335,7 @@ static PyObject *
|
|||
_io_FileIO_truncate_impl(fileio *self, PyObject *posobj);
|
||||
|
||||
static PyObject *
|
||||
_io_FileIO_truncate(fileio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_FileIO_truncate(fileio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *posobj = NULL;
|
||||
|
@ -353,10 +345,6 @@ _io_FileIO_truncate(fileio *self, PyObject **args, Py_ssize_t nargs, PyObject *k
|
|||
&posobj)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_FileIO_truncate_impl(self, posobj);
|
||||
|
||||
exit:
|
||||
|
@ -386,4 +374,4 @@ _io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored))
|
|||
#ifndef _IO_FILEIO_TRUNCATE_METHODDEF
|
||||
#define _IO_FILEIO_TRUNCATE_METHODDEF
|
||||
#endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */
|
||||
/*[clinic end generated code: output=034d782a0daa82bd input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=9d282c5eb1399024 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue