Skip to content

Commit

Permalink
Amend clinic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Jan 3, 2025
1 parent 5610098 commit 7daeccd
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions Lib/test/clinic.test.c
Original file line number Diff line number Diff line change
Expand Up @@ -4758,7 +4758,7 @@ static PyObject *
Test_cls_with_param_impl(TestObj *self, PyTypeObject *cls, int a);

static PyObject *
Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
Test_cls_with_param(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
Expand Down Expand Up @@ -4798,15 +4798,15 @@ Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_
if (a == -1 && PyErr_Occurred()) {
goto exit;
}
return_value = Test_cls_with_param_impl(self, cls, a);
return_value = Test_cls_with_param_impl((TestObj *)self, cls, a);

exit:
return return_value;
}

static PyObject *
Test_cls_with_param_impl(TestObj *self, PyTypeObject *cls, int a)
/*[clinic end generated code: output=83a391eea66d08f8 input=af158077bd237ef9]*/
/*[clinic end generated code: output=7e893134a81fef92 input=af158077bd237ef9]*/


/*[clinic input]
Expand Down Expand Up @@ -4908,18 +4908,18 @@ static PyObject *
Test_cls_no_params_impl(TestObj *self, PyTypeObject *cls);

static PyObject *
Test_cls_no_params(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
Test_cls_no_params(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {
PyErr_SetString(PyExc_TypeError, "cls_no_params() takes no arguments");
return NULL;
}
return Test_cls_no_params_impl(self, cls);
return Test_cls_no_params_impl((TestObj *)self, cls);
}

static PyObject *
Test_cls_no_params_impl(TestObj *self, PyTypeObject *cls)
/*[clinic end generated code: output=4d68b4652c144af3 input=e7e2e4e344e96a11]*/
/*[clinic end generated code: output=8845de054449f40a input=e7e2e4e344e96a11]*/


/*[clinic input]
Expand All @@ -4945,7 +4945,7 @@ Test_metho_not_default_return_converter(TestObj *self, PyObject *a)
PyObject *return_value = NULL;
int _return_value;

_return_value = Test_metho_not_default_return_converter_impl(self, a);
_return_value = Test_metho_not_default_return_converter_impl((TestObj *)self, a);
if ((_return_value == -1) && PyErr_Occurred()) {
goto exit;
}
Expand All @@ -4957,7 +4957,7 @@ Test_metho_not_default_return_converter(TestObj *self, PyObject *a)

static int
Test_metho_not_default_return_converter_impl(TestObj *self, PyObject *a)
/*[clinic end generated code: output=3350de11bd538007 input=428657129b521177]*/
/*[clinic end generated code: output=b2cce75a7af2e6ce input=428657129b521177]*/


/*[clinic input]
Expand All @@ -4983,7 +4983,7 @@ static PyObject *
Test_an_metho_arg_named_arg_impl(TestObj *self, int arg);

static PyObject *
Test_an_metho_arg_named_arg(TestObj *self, PyObject *arg_)
Test_an_metho_arg_named_arg(PyObject *self, PyObject *arg_)
{
PyObject *return_value = NULL;
int arg;
Expand All @@ -4992,15 +4992,15 @@ Test_an_metho_arg_named_arg(TestObj *self, PyObject *arg_)
if (arg == -1 && PyErr_Occurred()) {
goto exit;
}
return_value = Test_an_metho_arg_named_arg_impl(self, arg);
return_value = Test_an_metho_arg_named_arg_impl((TestObj *)self, arg);

exit:
return return_value;
}

static PyObject *
Test_an_metho_arg_named_arg_impl(TestObj *self, int arg)
/*[clinic end generated code: output=9f04de4a62287e28 input=2a53a57cf5624f95]*/
/*[clinic end generated code: output=38554f09950d07e7 input=2a53a57cf5624f95]*/


/*[clinic input]
Expand Down Expand Up @@ -5289,14 +5289,14 @@ static PyObject *
Test_meth_coexist_impl(TestObj *self);

static PyObject *
Test_meth_coexist(TestObj *self, PyObject *Py_UNUSED(ignored))
Test_meth_coexist(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return Test_meth_coexist_impl(self);
return Test_meth_coexist_impl((TestObj *)self);
}

static PyObject *
Test_meth_coexist_impl(TestObj *self)
/*[clinic end generated code: output=808a293d0cd27439 input=2a1d75b5e6fec6dd]*/
/*[clinic end generated code: output=7edf4e95b29f06fa input=2a1d75b5e6fec6dd]*/

/*[clinic input]
@getter
Expand All @@ -5317,14 +5317,14 @@ static PyObject *
Test_property_get_impl(TestObj *self);

static PyObject *
Test_property_get(TestObj *self, void *Py_UNUSED(context))
Test_property_get(PyObject *self, void *Py_UNUSED(context))
{
return Test_property_get_impl(self);
return Test_property_get_impl((TestObj *)self);
}

static PyObject *
Test_property_get_impl(TestObj *self)
/*[clinic end generated code: output=7cadd0f539805266 input=2d92b3449fbc7d2b]*/
/*[clinic end generated code: output=b38d68abd3466a6e input=2d92b3449fbc7d2b]*/

/*[clinic input]
@setter
Expand All @@ -5345,18 +5345,18 @@ static int
Test_property_set_impl(TestObj *self, PyObject *value);

static int
Test_property_set(TestObj *self, PyObject *value, void *Py_UNUSED(context))
Test_property_set(PyObject *self, PyObject *value, void *Py_UNUSED(context))
{
int return_value;

return_value = Test_property_set_impl(self, value);
return_value = Test_property_set_impl((TestObj *)self, value);

return return_value;
}

static int
Test_property_set_impl(TestObj *self, PyObject *value)
/*[clinic end generated code: output=e4342fe9bb1d7817 input=3bc3f46a23c83a88]*/
/*[clinic end generated code: output=49f925ab2a33b637 input=3bc3f46a23c83a88]*/

/*[clinic input]
@setter
Expand All @@ -5377,18 +5377,18 @@ static int
Test_setter_first_with_docstr_set_impl(TestObj *self, PyObject *value);

static int
Test_setter_first_with_docstr_set(TestObj *self, PyObject *value, void *Py_UNUSED(context))
Test_setter_first_with_docstr_set(PyObject *self, PyObject *value, void *Py_UNUSED(context))
{
int return_value;

return_value = Test_setter_first_with_docstr_set_impl(self, value);
return_value = Test_setter_first_with_docstr_set_impl((TestObj *)self, value);

return return_value;
}

static int
Test_setter_first_with_docstr_set_impl(TestObj *self, PyObject *value)
/*[clinic end generated code: output=e4d76b558a4061db input=31a045ce11bbe961]*/
/*[clinic end generated code: output=5aaf44373c0af545 input=31a045ce11bbe961]*/

/*[clinic input]
@getter
Expand Down Expand Up @@ -5418,14 +5418,14 @@ static PyObject *
Test_setter_first_with_docstr_get_impl(TestObj *self);

static PyObject *
Test_setter_first_with_docstr_get(TestObj *self, void *Py_UNUSED(context))
Test_setter_first_with_docstr_get(PyObject *self, void *Py_UNUSED(context))
{
return Test_setter_first_with_docstr_get_impl(self);
return Test_setter_first_with_docstr_get_impl((TestObj *)self);
}

static PyObject *
Test_setter_first_with_docstr_get_impl(TestObj *self)
/*[clinic end generated code: output=749a30266f9fb443 input=10af4e43b3cb34dc]*/
/*[clinic end generated code: output=fe6e3aa844a24920 input=10af4e43b3cb34dc]*/

/*[clinic input]
output push
Expand Down Expand Up @@ -5708,7 +5708,7 @@ Test__pyarg_parsestackandkeywords_impl(TestObj *self, PyTypeObject *cls,
Py_ssize_t key_length);

static PyObject *
Test__pyarg_parsestackandkeywords(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
Test__pyarg_parsestackandkeywords(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
Expand All @@ -5731,7 +5731,7 @@ Test__pyarg_parsestackandkeywords(TestObj *self, PyTypeObject *cls, PyObject *co
&key, &key_length)) {
goto exit;
}
return_value = Test__pyarg_parsestackandkeywords_impl(self, cls, key, key_length);
return_value = Test__pyarg_parsestackandkeywords_impl((TestObj *)self, cls, key, key_length);

exit:
return return_value;
Expand All @@ -5741,7 +5741,7 @@ static PyObject *
Test__pyarg_parsestackandkeywords_impl(TestObj *self, PyTypeObject *cls,
const char *key,
Py_ssize_t key_length)
/*[clinic end generated code: output=4fda8a7f2547137c input=fc72ef4b4cfafabc]*/
/*[clinic end generated code: output=7060c213d7b8200e input=fc72ef4b4cfafabc]*/


/*[clinic input]
Expand Down

0 comments on commit 7daeccd

Please sign in to comment.