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
28
third_party/python/Modules/_io/clinic/textio.inc
vendored
28
third_party/python/Modules/_io/clinic/textio.inc
vendored
|
@ -47,7 +47,7 @@ PyDoc_STRVAR(_io_IncrementalNewlineDecoder_decode__doc__,
|
|||
"\n");
|
||||
|
||||
#define _IO_INCREMENTALNEWLINEDECODER_DECODE_METHODDEF \
|
||||
{"decode", (PyCFunction)_io_IncrementalNewlineDecoder_decode, METH_FASTCALL, _io_IncrementalNewlineDecoder_decode__doc__},
|
||||
{"decode", (PyCFunction)_io_IncrementalNewlineDecoder_decode, METH_FASTCALL|METH_KEYWORDS, _io_IncrementalNewlineDecoder_decode__doc__},
|
||||
|
||||
static PyObject *
|
||||
_io_IncrementalNewlineDecoder_decode_impl(nldecoder_object *self,
|
||||
|
@ -232,7 +232,7 @@ static PyObject *
|
|||
_io_TextIOWrapper_read_impl(textio *self, Py_ssize_t n);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_read(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_TextIOWrapper_read(textio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t n = -1;
|
||||
|
@ -241,10 +241,6 @@ _io_TextIOWrapper_read(textio *self, PyObject **args, Py_ssize_t nargs, PyObject
|
|||
_PyIO_ConvertSsize_t, &n)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("read", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_TextIOWrapper_read_impl(self, n);
|
||||
|
||||
exit:
|
||||
|
@ -263,7 +259,7 @@ static PyObject *
|
|||
_io_TextIOWrapper_readline_impl(textio *self, Py_ssize_t size);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_readline(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_TextIOWrapper_readline(textio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
@ -272,10 +268,6 @@ _io_TextIOWrapper_readline(textio *self, PyObject **args, Py_ssize_t nargs, PyOb
|
|||
&size)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_TextIOWrapper_readline_impl(self, size);
|
||||
|
||||
exit:
|
||||
|
@ -294,7 +286,7 @@ static PyObject *
|
|||
_io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_seek(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_TextIOWrapper_seek(textio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *cookieObj;
|
||||
|
@ -304,10 +296,6 @@ _io_TextIOWrapper_seek(textio *self, PyObject **args, Py_ssize_t nargs, PyObject
|
|||
&cookieObj, &whence)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("seek", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_TextIOWrapper_seek_impl(self, cookieObj, whence);
|
||||
|
||||
exit:
|
||||
|
@ -343,7 +331,7 @@ static PyObject *
|
|||
_io_TextIOWrapper_truncate_impl(textio *self, PyObject *pos);
|
||||
|
||||
static PyObject *
|
||||
_io_TextIOWrapper_truncate(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
_io_TextIOWrapper_truncate(textio *self, PyObject **args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *pos = Py_None;
|
||||
|
@ -353,10 +341,6 @@ _io_TextIOWrapper_truncate(textio *self, PyObject **args, Py_ssize_t nargs, PyOb
|
|||
&pos)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = _io_TextIOWrapper_truncate_impl(self, pos);
|
||||
|
||||
exit:
|
||||
|
@ -481,4 +465,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
|
|||
{
|
||||
return _io_TextIOWrapper_close_impl(self);
|
||||
}
|
||||
/*[clinic end generated code: output=67eba50449900a96 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=eee57db91b6b0550 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue