diff options
author | Erlend E. Aasland <erlend@python.org> | 2024-02-06 10:21:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-06 10:21:00 (GMT) |
commit | ead9e784fb031429522bac6a43ddc0581458afd0 (patch) | |
tree | 9e17391834b3cd634586a5a5b66cc17fd02a64fd /Modules/clinic/sha512module.c.h | |
parent | 319e69579eaa73b1c106dacb44cb2148e9aa9e21 (diff) | |
download | cpython-ead9e784fb031429522bac6a43ddc0581458afd0.zip cpython-ead9e784fb031429522bac6a43ddc0581458afd0.tar.gz cpython-ead9e784fb031429522bac6a43ddc0581458afd0.tar.bz2 |
[3.11] gh-115015: Argument Clinic: fix generated code for METH_METHOD methods without params (#115016) (#115069)
(cherry picked from commit 09096a1647913526a3d4fa69a9d2056ec82a8f37)
Diffstat (limited to 'Modules/clinic/sha512module.c.h')
-rw-r--r-- | Modules/clinic/sha512module.c.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/clinic/sha512module.c.h b/Modules/clinic/sha512module.c.h index b722748..4bde674 100644 --- a/Modules/clinic/sha512module.c.h +++ b/Modules/clinic/sha512module.c.h @@ -17,7 +17,7 @@ SHA512Type_copy_impl(SHAobject *self, PyTypeObject *cls); static PyObject * SHA512Type_copy(SHAobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { - if (nargs) { + if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) { PyErr_SetString(PyExc_TypeError, "copy() takes no arguments"); return NULL; } @@ -170,4 +170,4 @@ skip_optional_kwonly: exit: return return_value; } -/*[clinic end generated code: output=60a0a1a28c07f391 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b6148bd0dc27e33b input=a9049054013a1b77]*/ |