summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/sha2module.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/clinic/sha2module.c.h')
-rw-r--r--Modules/clinic/sha2module.c.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/clinic/sha2module.c.h b/Modules/clinic/sha2module.c.h
index ec31d55..cf4b88d 100644
--- a/Modules/clinic/sha2module.c.h
+++ b/Modules/clinic/sha2module.c.h
@@ -23,7 +23,7 @@ SHA256Type_copy_impl(SHA256object *self, PyTypeObject *cls);
static PyObject *
SHA256Type_copy(SHA256object *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;
}
@@ -45,7 +45,7 @@ SHA512Type_copy_impl(SHA512object *self, PyTypeObject *cls);
static PyObject *
SHA512Type_copy(SHA512object *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;
}
@@ -437,4 +437,4 @@ skip_optional_kwonly:
exit:
return return_value;
}
-/*[clinic end generated code: output=1482d9de086e45c4 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b46da764024b1764 input=a9049054013a1b77]*/