diff options
author | Erlend E. Aasland <erlend@python.org> | 2024-02-05 20:49:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 20:49:17 (GMT) |
commit | 09096a1647913526a3d4fa69a9d2056ec82a8f37 (patch) | |
tree | 906760eb46b791e15777b34a2a8bd21399ab5b27 /Modules/clinic/_lsprof.c.h | |
parent | 4aa4f0906df9fc9c6c6f6657f2c521468c6b1688 (diff) | |
download | cpython-09096a1647913526a3d4fa69a9d2056ec82a8f37.zip cpython-09096a1647913526a3d4fa69a9d2056ec82a8f37.tar.gz cpython-09096a1647913526a3d4fa69a9d2056ec82a8f37.tar.bz2 |
gh-115015: Argument Clinic: fix generated code for METH_METHOD methods without params (#115016)
Diffstat (limited to 'Modules/clinic/_lsprof.c.h')
-rw-r--r-- | Modules/clinic/_lsprof.c.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/clinic/_lsprof.c.h b/Modules/clinic/_lsprof.c.h index dfc003e..b3b7fda 100644 --- a/Modules/clinic/_lsprof.c.h +++ b/Modules/clinic/_lsprof.c.h @@ -39,10 +39,10 @@ _lsprof_Profiler_getstats_impl(ProfilerObject *self, PyTypeObject *cls); static PyObject * _lsprof_Profiler_getstats(ProfilerObject *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, "getstats() takes no arguments"); return NULL; } return _lsprof_Profiler_getstats_impl(self, cls); } -/*[clinic end generated code: output=0615a53cce828f06 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5c9d87d89863dc83 input=a9049054013a1b77]*/ |