mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
gh-111178: Generate correct signature for most self converters (#128447)
This commit is contained in:
parent
4d0a6595a0
commit
537296cdcd
74 changed files with 1627 additions and 1631 deletions
26
Python/clinic/context.c.h
generated
26
Python/clinic/context.c.h
generated
|
@ -21,7 +21,7 @@ _contextvars_Context_get_impl(PyContext *self, PyObject *key,
|
|||
PyObject *default_value);
|
||||
|
||||
static PyObject *
|
||||
_contextvars_Context_get(PyContext *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_contextvars_Context_get(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *key;
|
||||
|
@ -36,7 +36,7 @@ _contextvars_Context_get(PyContext *self, PyObject *const *args, Py_ssize_t narg
|
|||
}
|
||||
default_value = args[1];
|
||||
skip_optional:
|
||||
return_value = _contextvars_Context_get_impl(self, key, default_value);
|
||||
return_value = _contextvars_Context_get_impl((PyContext *)self, key, default_value);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -57,9 +57,9 @@ static PyObject *
|
|||
_contextvars_Context_items_impl(PyContext *self);
|
||||
|
||||
static PyObject *
|
||||
_contextvars_Context_items(PyContext *self, PyObject *Py_UNUSED(ignored))
|
||||
_contextvars_Context_items(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _contextvars_Context_items_impl(self);
|
||||
return _contextvars_Context_items_impl((PyContext *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_contextvars_Context_keys__doc__,
|
||||
|
@ -75,9 +75,9 @@ static PyObject *
|
|||
_contextvars_Context_keys_impl(PyContext *self);
|
||||
|
||||
static PyObject *
|
||||
_contextvars_Context_keys(PyContext *self, PyObject *Py_UNUSED(ignored))
|
||||
_contextvars_Context_keys(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _contextvars_Context_keys_impl(self);
|
||||
return _contextvars_Context_keys_impl((PyContext *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_contextvars_Context_values__doc__,
|
||||
|
@ -93,9 +93,9 @@ static PyObject *
|
|||
_contextvars_Context_values_impl(PyContext *self);
|
||||
|
||||
static PyObject *
|
||||
_contextvars_Context_values(PyContext *self, PyObject *Py_UNUSED(ignored))
|
||||
_contextvars_Context_values(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _contextvars_Context_values_impl(self);
|
||||
return _contextvars_Context_values_impl((PyContext *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_contextvars_Context_copy__doc__,
|
||||
|
@ -111,9 +111,9 @@ static PyObject *
|
|||
_contextvars_Context_copy_impl(PyContext *self);
|
||||
|
||||
static PyObject *
|
||||
_contextvars_Context_copy(PyContext *self, PyObject *Py_UNUSED(ignored))
|
||||
_contextvars_Context_copy(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _contextvars_Context_copy_impl(self);
|
||||
return _contextvars_Context_copy_impl((PyContext *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(_contextvars_ContextVar_get__doc__,
|
||||
|
@ -135,7 +135,7 @@ static PyObject *
|
|||
_contextvars_ContextVar_get_impl(PyContextVar *self, PyObject *default_value);
|
||||
|
||||
static PyObject *
|
||||
_contextvars_ContextVar_get(PyContextVar *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
_contextvars_ContextVar_get(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *default_value = NULL;
|
||||
|
@ -148,7 +148,7 @@ _contextvars_ContextVar_get(PyContextVar *self, PyObject *const *args, Py_ssize_
|
|||
}
|
||||
default_value = args[0];
|
||||
skip_optional:
|
||||
return_value = _contextvars_ContextVar_get_impl(self, default_value);
|
||||
return_value = _contextvars_ContextVar_get_impl((PyContextVar *)self, default_value);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -179,4 +179,4 @@ PyDoc_STRVAR(_contextvars_ContextVar_reset__doc__,
|
|||
|
||||
#define _CONTEXTVARS_CONTEXTVAR_RESET_METHODDEF \
|
||||
{"reset", (PyCFunction)_contextvars_ContextVar_reset, METH_O, _contextvars_ContextVar_reset__doc__},
|
||||
/*[clinic end generated code: output=b667826178444c3f input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=444567eaf0df25e0 input=a9049054013a1b77]*/
|
||||
|
|
26
Python/clinic/instruction_sequence.c.h
generated
26
Python/clinic/instruction_sequence.c.h
generated
|
@ -51,7 +51,7 @@ InstructionSequenceType_use_label_impl(_PyInstructionSequence *self,
|
|||
int label);
|
||||
|
||||
static PyObject *
|
||||
InstructionSequenceType_use_label(_PyInstructionSequence *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
InstructionSequenceType_use_label(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)
|
||||
|
@ -91,7 +91,7 @@ InstructionSequenceType_use_label(_PyInstructionSequence *self, PyObject *const
|
|||
if (label == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = InstructionSequenceType_use_label_impl(self, label);
|
||||
return_value = InstructionSequenceType_use_label_impl((_PyInstructionSequence *)self, label);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -113,7 +113,7 @@ InstructionSequenceType_addop_impl(_PyInstructionSequence *self, int opcode,
|
|||
int end_lineno, int end_col_offset);
|
||||
|
||||
static PyObject *
|
||||
InstructionSequenceType_addop(_PyInstructionSequence *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
InstructionSequenceType_addop(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)
|
||||
|
@ -178,7 +178,7 @@ InstructionSequenceType_addop(_PyInstructionSequence *self, PyObject *const *arg
|
|||
if (end_col_offset == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = InstructionSequenceType_addop_impl(self, opcode, oparg, lineno, col_offset, end_lineno, end_col_offset);
|
||||
return_value = InstructionSequenceType_addop_impl((_PyInstructionSequence *)self, opcode, oparg, lineno, col_offset, end_lineno, end_col_offset);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -197,12 +197,12 @@ static int
|
|||
InstructionSequenceType_new_label_impl(_PyInstructionSequence *self);
|
||||
|
||||
static PyObject *
|
||||
InstructionSequenceType_new_label(_PyInstructionSequence *self, PyObject *Py_UNUSED(ignored))
|
||||
InstructionSequenceType_new_label(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
int _return_value;
|
||||
|
||||
_return_value = InstructionSequenceType_new_label_impl(self);
|
||||
_return_value = InstructionSequenceType_new_label_impl((_PyInstructionSequence *)self);
|
||||
if ((_return_value == -1) && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ InstructionSequenceType_add_nested_impl(_PyInstructionSequence *self,
|
|||
PyObject *nested);
|
||||
|
||||
static PyObject *
|
||||
InstructionSequenceType_add_nested(_PyInstructionSequence *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
InstructionSequenceType_add_nested(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)
|
||||
|
@ -263,7 +263,7 @@ InstructionSequenceType_add_nested(_PyInstructionSequence *self, PyObject *const
|
|||
goto exit;
|
||||
}
|
||||
nested = args[0];
|
||||
return_value = InstructionSequenceType_add_nested_impl(self, nested);
|
||||
return_value = InstructionSequenceType_add_nested_impl((_PyInstructionSequence *)self, nested);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
|
@ -282,9 +282,9 @@ static PyObject *
|
|||
InstructionSequenceType_get_nested_impl(_PyInstructionSequence *self);
|
||||
|
||||
static PyObject *
|
||||
InstructionSequenceType_get_nested(_PyInstructionSequence *self, PyObject *Py_UNUSED(ignored))
|
||||
InstructionSequenceType_get_nested(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return InstructionSequenceType_get_nested_impl(self);
|
||||
return InstructionSequenceType_get_nested_impl((_PyInstructionSequence *)self);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(InstructionSequenceType_get_instructions__doc__,
|
||||
|
@ -300,8 +300,8 @@ static PyObject *
|
|||
InstructionSequenceType_get_instructions_impl(_PyInstructionSequence *self);
|
||||
|
||||
static PyObject *
|
||||
InstructionSequenceType_get_instructions(_PyInstructionSequence *self, PyObject *Py_UNUSED(ignored))
|
||||
InstructionSequenceType_get_instructions(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return InstructionSequenceType_get_instructions_impl(self);
|
||||
return InstructionSequenceType_get_instructions_impl((_PyInstructionSequence *)self);
|
||||
}
|
||||
/*[clinic end generated code: output=35163e5b589b4446 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=e6b5d05bde008cc2 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue