summaryrefslogtreecommitdiff
path: root/Modules/clinic/sha1module.c.h
diff options
context:
space:
mode:
authorMariatta Wijaya <mariatta.wijaya@gmail.com>2017-02-06 20:16:58 -0800
committerMariatta Wijaya <mariatta.wijaya@gmail.com>2017-02-06 20:16:58 -0800
commitda79bcf8ac7ae72218ab023e1ed54390bc1a3a27 (patch)
tree74845e2dbd9521d9748b9c32f1922f4123083bf3 /Modules/clinic/sha1module.c.h
parente3c7e835bdfc97750eb9b7fc0ad2493108c2d438 (diff)
parent1fe806ac56f8b83694d24ab604eb695d00bc8497 (diff)
downloadcpython-da79bcf8ac7ae72218ab023e1ed54390bc1a3a27.tar.gz
Issue #29371: merge with 3.5
Diffstat (limited to 'Modules/clinic/sha1module.c.h')
-rw-r--r--Modules/clinic/sha1module.c.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h
index 5b8db8079b..b08e92d099 100644
--- a/Modules/clinic/sha1module.c.h
+++ b/Modules/clinic/sha1module.c.h
@@ -72,24 +72,26 @@ PyDoc_STRVAR(_sha1_sha1__doc__,
"Return a new SHA1 hash object; optionally initialized with a string.");
#define _SHA1_SHA1_METHODDEF \
- {"sha1", (PyCFunction)_sha1_sha1, METH_VARARGS|METH_KEYWORDS, _sha1_sha1__doc__},
+ {"sha1", (PyCFunction)_sha1_sha1, METH_FASTCALL, _sha1_sha1__doc__},
static PyObject *
_sha1_sha1_impl(PyObject *module, PyObject *string);
static PyObject *
-_sha1_sha1(PyObject *module, PyObject *args, PyObject *kwargs)
+_sha1_sha1(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
- static char *_keywords[] = {"string", NULL};
+ static const char * const _keywords[] = {"string", NULL};
+ static _PyArg_Parser _parser = {"|O:sha1", _keywords, 0};
PyObject *string = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha1", _keywords,
- &string))
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
+ &string)) {
goto exit;
+ }
return_value = _sha1_sha1_impl(module, string);
exit:
return return_value;
}
-/*[clinic end generated code: output=0b6a194fbb0b94f2 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=1430450f3f806895 input=a9049054013a1b77]*/