summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_dbmmodule.c.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2022-04-30 10:15:02 (GMT)
committerGitHub <noreply@github.com>2022-04-30 10:15:02 (GMT)
commita055dac0b45031878a8196a8735522de018491e3 (patch)
tree5228f98a9ce93456c5d3db84a3fed0096b8f0f38 /Modules/clinic/_dbmmodule.c.h
parent19dca041212f9f58ee11833bff3f8c157d4fd3e8 (diff)
downloadcpython-a055dac0b45031878a8196a8735522de018491e3.zip
cpython-a055dac0b45031878a8196a8735522de018491e3.tar.gz
cpython-a055dac0b45031878a8196a8735522de018491e3.tar.bz2
gh-91583: AC: Fix regression for functions with defining_class (GH-91739)
Argument Clinic now generates the same efficient code as before adding the defining_class parameter.
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]*/