summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_dbmmodule.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/clinic/_dbmmodule.c.h')
-rw-r--r--Modules/clinic/_dbmmodule.c.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/Modules/clinic/_dbmmodule.c.h b/Modules/clinic/_dbmmodule.c.h
index f0b8220..a8b4160 100644
--- a/Modules/clinic/_dbmmodule.c.h
+++ b/Modules/clinic/_dbmmodule.c.h
@@ -35,18 +35,11 @@ _dbm_dbm_keys_impl(dbmobject *self, PyTypeObject *cls);
static PyObject *
_dbm_dbm_keys(dbmobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
- PyObject *return_value = NULL;
- static const char * const _keywords[] = { NULL};
- static _PyArg_Parser _parser = {":keys", _keywords, 0};
-
- if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser
- )) {
- goto exit;
+ if (nargs) {
+ PyErr_SetString(PyExc_TypeError, "keys() takes no arguments");
+ return NULL;
}
- return_value = _dbm_dbm_keys_impl(self, cls);
-
-exit:
- return return_value;
+ return _dbm_dbm_keys_impl(self, cls);
}
PyDoc_STRVAR(_dbm_dbm_get__doc__,
@@ -179,4 +172,4 @@ skip_optional:
exit:
return return_value;
}
-/*[clinic end generated code: output=32ef6c0f8f2d3db9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=492be70729515fe3 input=a9049054013a1b77]*/