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.
This commit is contained in:
Serhiy Storchaka 2022-04-30 13:15:02 +03:00 committed by GitHub
parent 19dca04121
commit a055dac0b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 820 additions and 449 deletions

View file

@ -39,17 +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)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = { NULL};
static _PyArg_Parser _parser = {":getstats", _keywords, 0};
if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser
)) {
goto exit;
if (nargs) {
PyErr_SetString(PyExc_TypeError, "getstats() takes no arguments");
return NULL;
}
return_value = _lsprof_Profiler_getstats_impl(self, cls);
exit:
return return_value;
return _lsprof_Profiler_getstats_impl(self, cls);
}
/*[clinic end generated code: output=b4727cfebecdd22d input=a9049054013a1b77]*/
/*[clinic end generated code: output=57c7b6b0b8666429 input=a9049054013a1b77]*/