summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-01-17 01:21:47 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-01-17 01:21:47 (GMT)
commit0c4a828cadfccd8b95a39f7930705de75ed5f729 (patch)
tree713eeceb5c63f4324fa83e9603a0284272e9eb58 /Modules/cjkcodecs
parent093119e4eb8424451ef24a5a5a3ce9881d77abd5 (diff)
downloadcpython-0c4a828cadfccd8b95a39f7930705de75ed5f729.zip
cpython-0c4a828cadfccd8b95a39f7930705de75ed5f729.tar.gz
cpython-0c4a828cadfccd8b95a39f7930705de75ed5f729.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 "boring" positional arguments. Manually fix _elementtree: _elementtree_XMLParser_doctype() must remain consistent with the clinic code.
Diffstat (limited to 'Modules/cjkcodecs')
-rw-r--r--Modules/cjkcodecs/clinic/multibytecodec.c.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h
index 005a1ba..4be06bb 100644
--- a/Modules/cjkcodecs/clinic/multibytecodec.c.h
+++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h
@@ -192,23 +192,27 @@ PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_read__doc__,
"\n");
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READ_METHODDEF \
- {"read", (PyCFunction)_multibytecodec_MultibyteStreamReader_read, METH_VARARGS, _multibytecodec_MultibyteStreamReader_read__doc__},
+ {"read", (PyCFunction)_multibytecodec_MultibyteStreamReader_read, METH_FASTCALL, _multibytecodec_MultibyteStreamReader_read__doc__},
static PyObject *
_multibytecodec_MultibyteStreamReader_read_impl(MultibyteStreamReaderObject *self,
PyObject *sizeobj);
static PyObject *
-_multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, PyObject *args)
+_multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *sizeobj = Py_None;
- if (!PyArg_UnpackTuple(args, "read",
+ if (!_PyArg_UnpackStack(args, nargs, "read",
0, 1,
&sizeobj)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("read", kwnames)) {
+ goto exit;
+ }
return_value = _multibytecodec_MultibyteStreamReader_read_impl(self, sizeobj);
exit:
@@ -221,23 +225,27 @@ PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readline__doc__,
"\n");
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINE_METHODDEF \
- {"readline", (PyCFunction)_multibytecodec_MultibyteStreamReader_readline, METH_VARARGS, _multibytecodec_MultibyteStreamReader_readline__doc__},
+ {"readline", (PyCFunction)_multibytecodec_MultibyteStreamReader_readline, METH_FASTCALL, _multibytecodec_MultibyteStreamReader_readline__doc__},
static PyObject *
_multibytecodec_MultibyteStreamReader_readline_impl(MultibyteStreamReaderObject *self,
PyObject *sizeobj);
static PyObject *
-_multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self, PyObject *args)
+_multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *sizeobj = Py_None;
- if (!PyArg_UnpackTuple(args, "readline",
+ if (!_PyArg_UnpackStack(args, nargs, "readline",
0, 1,
&sizeobj)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("readline", kwnames)) {
+ goto exit;
+ }
return_value = _multibytecodec_MultibyteStreamReader_readline_impl(self, sizeobj);
exit:
@@ -250,23 +258,27 @@ PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readlines__doc__,
"\n");
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINES_METHODDEF \
- {"readlines", (PyCFunction)_multibytecodec_MultibyteStreamReader_readlines, METH_VARARGS, _multibytecodec_MultibyteStreamReader_readlines__doc__},
+ {"readlines", (PyCFunction)_multibytecodec_MultibyteStreamReader_readlines, METH_FASTCALL, _multibytecodec_MultibyteStreamReader_readlines__doc__},
static PyObject *
_multibytecodec_MultibyteStreamReader_readlines_impl(MultibyteStreamReaderObject *self,
PyObject *sizehintobj);
static PyObject *
-_multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *self, PyObject *args)
+_multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *sizehintobj = Py_None;
- if (!PyArg_UnpackTuple(args, "readlines",
+ if (!_PyArg_UnpackStack(args, nargs, "readlines",
0, 1,
&sizehintobj)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("readlines", kwnames)) {
+ goto exit;
+ }
return_value = _multibytecodec_MultibyteStreamReader_readlines_impl(self, sizehintobj);
exit:
@@ -330,4 +342,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__,
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
-/*[clinic end generated code: output=7d6a05b0a581fd17 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=26710ffd4b3c7d7e input=a9049054013a1b77]*/