summaryrefslogtreecommitdiffstats
path: root/Modules/_io/clinic/stringio.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/stringio.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/stringio.c.h')
-rw-r--r--Modules/_io/clinic/stringio.c.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/_io/clinic/stringio.c.h b/Modules/_io/clinic/stringio.c.h
index d2c05d7..e617201 100644
--- a/Modules/_io/clinic/stringio.c.h
+++ b/Modules/_io/clinic/stringio.c.h
@@ -147,22 +147,26 @@ PyDoc_STRVAR(_io_StringIO_seek__doc__,
"Returns the new absolute position.");
#define _IO_STRINGIO_SEEK_METHODDEF \
- {"seek", (PyCFunction)_io_StringIO_seek, METH_VARARGS, _io_StringIO_seek__doc__},
+ {"seek", (PyCFunction)_io_StringIO_seek, METH_FASTCALL, _io_StringIO_seek__doc__},
static PyObject *
_io_StringIO_seek_impl(stringio *self, Py_ssize_t pos, int whence);
static PyObject *
-_io_StringIO_seek(stringio *self, PyObject *args)
+_io_StringIO_seek(stringio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_ssize_t pos;
int whence = 0;
- if (!PyArg_ParseTuple(args, "n|i:seek",
+ if (!_PyArg_ParseStack(args, nargs, "n|i:seek",
&pos, &whence)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("seek", kwnames)) {
+ goto exit;
+ }
return_value = _io_StringIO_seek_impl(self, pos, whence);
exit:
@@ -289,4 +293,4 @@ _io_StringIO_seekable(stringio *self, PyObject *Py_UNUSED(ignored))
{
return _io_StringIO_seekable_impl(self);
}
-/*[clinic end generated code: output=5dd5c2a213e75405 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=69bf262268745061 input=a9049054013a1b77]*/