aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Objects/clinic/codeobject.c.h
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2025-01-20 12:40:18 +0100
committerGitHub <noreply@github.com>2025-01-20 12:40:18 +0100
commit537296cdcdecae5c2322e809d01ec07f0cb79245 (patch)
tree478d297f90da93087a74be6ec35f7769bd577165 /Objects/clinic/codeobject.c.h
parent4d0a6595a06c554c57ebd90ee64ff4c2bec239b8 (diff)
downloadcpython-537296cdcdecae5c2322e809d01ec07f0cb79245.tar.gz
cpython-537296cdcdecae5c2322e809d01ec07f0cb79245.zip
gh-111178: Generate correct signature for most self converters (#128447)
Diffstat (limited to 'Objects/clinic/codeobject.c.h')
-rw-r--r--Objects/clinic/codeobject.c.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h
index 45738f767df..2184742cc0d 100644
--- a/Objects/clinic/codeobject.c.h
+++ b/Objects/clinic/codeobject.c.h
@@ -174,7 +174,7 @@ code_replace_impl(PyCodeObject *self, int co_argcount,
PyObject *co_exceptiontable);
static PyObject *
-code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+code_replace(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
@@ -204,24 +204,24 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje
#undef KWTUPLE
PyObject *argsbuf[18];
Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
- int co_argcount = self->co_argcount;
- int co_posonlyargcount = self->co_posonlyargcount;
- int co_kwonlyargcount = self->co_kwonlyargcount;
- int co_nlocals = self->co_nlocals;
- int co_stacksize = self->co_stacksize;
- int co_flags = self->co_flags;
- int co_firstlineno = self->co_firstlineno;
+ int co_argcount = ((PyCodeObject *)self)->co_argcount;
+ int co_posonlyargcount = ((PyCodeObject *)self)->co_posonlyargcount;
+ int co_kwonlyargcount = ((PyCodeObject *)self)->co_kwonlyargcount;
+ int co_nlocals = ((PyCodeObject *)self)->co_nlocals;
+ int co_stacksize = ((PyCodeObject *)self)->co_stacksize;
+ int co_flags = ((PyCodeObject *)self)->co_flags;
+ int co_firstlineno = ((PyCodeObject *)self)->co_firstlineno;
PyObject *co_code = NULL;
- PyObject *co_consts = self->co_consts;
- PyObject *co_names = self->co_names;
+ PyObject *co_consts = ((PyCodeObject *)self)->co_consts;
+ PyObject *co_names = ((PyCodeObject *)self)->co_names;
PyObject *co_varnames = NULL;
PyObject *co_freevars = NULL;
PyObject *co_cellvars = NULL;
- PyObject *co_filename = self->co_filename;
- PyObject *co_name = self->co_name;
- PyObject *co_qualname = self->co_qualname;
- PyObject *co_linetable = self->co_linetable;
- PyObject *co_exceptiontable = self->co_exceptiontable;
+ PyObject *co_filename = ((PyCodeObject *)self)->co_filename;
+ PyObject *co_name = ((PyCodeObject *)self)->co_name;
+ PyObject *co_qualname = ((PyCodeObject *)self)->co_qualname;
+ PyObject *co_linetable = ((PyCodeObject *)self)->co_linetable;
+ PyObject *co_exceptiontable = ((PyCodeObject *)self)->co_exceptiontable;
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
/*minpos*/ 0, /*maxpos*/ 0, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
@@ -400,7 +400,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje
}
co_exceptiontable = args[17];
skip_optional_kwonly:
- return_value = code_replace_impl(self, co_argcount, co_posonlyargcount, co_kwonlyargcount, co_nlocals, co_stacksize, co_flags, co_firstlineno, co_code, co_consts, co_names, co_varnames, co_freevars, co_cellvars, co_filename, co_name, co_qualname, co_linetable, co_exceptiontable);
+ return_value = code_replace_impl((PyCodeObject *)self, co_argcount, co_posonlyargcount, co_kwonlyargcount, co_nlocals, co_stacksize, co_flags, co_firstlineno, co_code, co_consts, co_names, co_varnames, co_freevars, co_cellvars, co_filename, co_name, co_qualname, co_linetable, co_exceptiontable);
exit:
return return_value;
@@ -421,7 +421,7 @@ static PyObject *
code__varname_from_oparg_impl(PyCodeObject *self, int oparg);
static PyObject *
-code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+code__varname_from_oparg(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
@@ -461,9 +461,9 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n
if (oparg == -1 && PyErr_Occurred()) {
goto exit;
}
- return_value = code__varname_from_oparg_impl(self, oparg);
+ return_value = code__varname_from_oparg_impl((PyCodeObject *)self, oparg);
exit:
return return_value;
}
-/*[clinic end generated code: output=e919ea67a1bcf524 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=73861c79e93aaee5 input=a9049054013a1b77]*/