summaryrefslogtreecommitdiffstats
path: root/Modules/_io/clinic/textio.c.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-01-17 00:35:17 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-01-17 00:35:17 (GMT)
commit259f0e4437ed30036578aba822560feb531b7735 (patch)
tree2ed9ead4992b791c76e1d52e0db3d1cd0516ec11 /Modules/_io/clinic/textio.c.h
parent0c8c3893ae29fab8ce9db0c2f5b52acbe89032e1 (diff)
downloadcpython-259f0e4437ed30036578aba822560feb531b7735.zip
cpython-259f0e4437ed30036578aba822560feb531b7735.tar.gz
cpython-259f0e4437ed30036578aba822560feb531b7735.tar.bz2
Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using only positional arguments.
Diffstat (limited to 'Modules/_io/clinic/textio.c.h')
-rw-r--r--Modules/_io/clinic/textio.c.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h
index 96696c3..1844e4d 100644
--- a/Modules/_io/clinic/textio.c.h
+++ b/Modules/_io/clinic/textio.c.h
@@ -225,21 +225,25 @@ PyDoc_STRVAR(_io_TextIOWrapper_read__doc__,
"\n");
#define _IO_TEXTIOWRAPPER_READ_METHODDEF \
- {"read", (PyCFunction)_io_TextIOWrapper_read, METH_VARARGS, _io_TextIOWrapper_read__doc__},
+ {"read", (PyCFunction)_io_TextIOWrapper_read, METH_FASTCALL, _io_TextIOWrapper_read__doc__},
static PyObject *
_io_TextIOWrapper_read_impl(textio *self, Py_ssize_t n);
static PyObject *
-_io_TextIOWrapper_read(textio *self, PyObject *args)
+_io_TextIOWrapper_read(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_ssize_t n = -1;
- if (!PyArg_ParseTuple(args, "|O&:read",
+ if (!_PyArg_ParseStack(args, nargs, "|O&:read",
_PyIO_ConvertSsize_t, &n)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("read", kwnames)) {
+ goto exit;
+ }
return_value = _io_TextIOWrapper_read_impl(self, n);
exit:
@@ -252,21 +256,25 @@ PyDoc_STRVAR(_io_TextIOWrapper_readline__doc__,
"\n");
#define _IO_TEXTIOWRAPPER_READLINE_METHODDEF \
- {"readline", (PyCFunction)_io_TextIOWrapper_readline, METH_VARARGS, _io_TextIOWrapper_readline__doc__},
+ {"readline", (PyCFunction)_io_TextIOWrapper_readline, METH_FASTCALL, _io_TextIOWrapper_readline__doc__},
static PyObject *
_io_TextIOWrapper_readline_impl(textio *self, Py_ssize_t size);
static PyObject *
-_io_TextIOWrapper_readline(textio *self, PyObject *args)
+_io_TextIOWrapper_readline(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
- if (!PyArg_ParseTuple(args, "|n:readline",
+ if (!_PyArg_ParseStack(args, nargs, "|n:readline",
&size)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("readline", kwnames)) {
+ goto exit;
+ }
return_value = _io_TextIOWrapper_readline_impl(self, size);
exit:
@@ -279,22 +287,26 @@ PyDoc_STRVAR(_io_TextIOWrapper_seek__doc__,
"\n");
#define _IO_TEXTIOWRAPPER_SEEK_METHODDEF \
- {"seek", (PyCFunction)_io_TextIOWrapper_seek, METH_VARARGS, _io_TextIOWrapper_seek__doc__},
+ {"seek", (PyCFunction)_io_TextIOWrapper_seek, METH_FASTCALL, _io_TextIOWrapper_seek__doc__},
static PyObject *
_io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence);
static PyObject *
-_io_TextIOWrapper_seek(textio *self, PyObject *args)
+_io_TextIOWrapper_seek(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *cookieObj;
int whence = 0;
- if (!PyArg_ParseTuple(args, "O|i:seek",
+ if (!_PyArg_ParseStack(args, nargs, "O|i:seek",
&cookieObj, &whence)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("seek", kwnames)) {
+ goto exit;
+ }
return_value = _io_TextIOWrapper_seek_impl(self, cookieObj, whence);
exit:
@@ -464,4 +476,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
{
return _io_TextIOWrapper_close_impl(self);
}
-/*[clinic end generated code: output=78ad14eba1667254 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=1f8367c7a3301670 input=a9049054013a1b77]*/