summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/binascii.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/clinic/binascii.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/clinic/binascii.c.h')
-rw-r--r--Modules/clinic/binascii.c.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h
index b457ff8..093d32b 100644
--- a/Modules/clinic/binascii.c.h
+++ b/Modules/clinic/binascii.c.h
@@ -266,23 +266,27 @@ PyDoc_STRVAR(binascii_crc_hqx__doc__,
"Compute CRC-CCITT incrementally.");
#define BINASCII_CRC_HQX_METHODDEF \
- {"crc_hqx", (PyCFunction)binascii_crc_hqx, METH_VARARGS, binascii_crc_hqx__doc__},
+ {"crc_hqx", (PyCFunction)binascii_crc_hqx, METH_FASTCALL, binascii_crc_hqx__doc__},
static unsigned int
binascii_crc_hqx_impl(PyObject *module, Py_buffer *data, unsigned int crc);
static PyObject *
-binascii_crc_hqx(PyObject *module, PyObject *args)
+binascii_crc_hqx(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
unsigned int crc;
unsigned int _return_value;
- if (!PyArg_ParseTuple(args, "y*I:crc_hqx",
+ if (!_PyArg_ParseStack(args, nargs, "y*I:crc_hqx",
&data, &crc)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("crc_hqx", kwnames)) {
+ goto exit;
+ }
_return_value = binascii_crc_hqx_impl(module, &data, crc);
if ((_return_value == (unsigned int)-1) && PyErr_Occurred()) {
goto exit;
@@ -305,23 +309,27 @@ PyDoc_STRVAR(binascii_crc32__doc__,
"Compute CRC-32 incrementally.");
#define BINASCII_CRC32_METHODDEF \
- {"crc32", (PyCFunction)binascii_crc32, METH_VARARGS, binascii_crc32__doc__},
+ {"crc32", (PyCFunction)binascii_crc32, METH_FASTCALL, binascii_crc32__doc__},
static unsigned int
binascii_crc32_impl(PyObject *module, Py_buffer *data, unsigned int crc);
static PyObject *
-binascii_crc32(PyObject *module, PyObject *args)
+binascii_crc32(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
unsigned int crc = 0;
unsigned int _return_value;
- if (!PyArg_ParseTuple(args, "y*|I:crc32",
+ if (!_PyArg_ParseStack(args, nargs, "y*|I:crc32",
&data, &crc)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("crc32", kwnames)) {
+ goto exit;
+ }
_return_value = binascii_crc32_impl(module, &data, crc);
if ((_return_value == (unsigned int)-1) && PyErr_Occurred()) {
goto exit;
@@ -550,4 +558,4 @@ exit:
return return_value;
}
-/*[clinic end generated code: output=458eb09731cb7877 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=4a418f883ccc79fe input=a9049054013a1b77]*/