diff options
Diffstat (limited to 'Modules/clinic/sha256module.c.h')
-rw-r--r-- | Modules/clinic/sha256module.c.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/Modules/clinic/sha256module.c.h b/Modules/clinic/sha256module.c.h index 14a88a2..658abb1 100644 --- a/Modules/clinic/sha256module.c.h +++ b/Modules/clinic/sha256module.c.h @@ -82,13 +82,20 @@ _sha256_sha256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje { PyObject *return_value = NULL; static const char * const _keywords[] = {"string", NULL}; - static _PyArg_Parser _parser = {"|O:sha256", _keywords, 0}; + static _PyArg_Parser _parser = {NULL, _keywords, "sha256", 0}; + PyObject *argsbuf[1]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *string = NULL; - if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, - &string)) { + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + if (!args) { goto exit; } + if (!noptargs) { + goto skip_optional_pos; + } + string = args[0]; +skip_optional_pos: return_value = _sha256_sha256_impl(module, string); exit: @@ -112,16 +119,23 @@ _sha256_sha224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje { PyObject *return_value = NULL; static const char * const _keywords[] = {"string", NULL}; - static _PyArg_Parser _parser = {"|O:sha224", _keywords, 0}; + static _PyArg_Parser _parser = {NULL, _keywords, "sha224", 0}; + PyObject *argsbuf[1]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *string = NULL; - if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, - &string)) { + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + if (!args) { goto exit; } + if (!noptargs) { + goto skip_optional_pos; + } + string = args[0]; +skip_optional_pos: return_value = _sha256_sha224_impl(module, string); exit: return return_value; } -/*[clinic end generated code: output=fb208641d4bc3b5f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c54d0956ec88409d input=a9049054013a1b77]*/ |