mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
Fix also return type for few other functions (clear, releasebuffer).
This commit is contained in:
parent
1005c84535
commit
d4f9cf5545
25 changed files with 128 additions and 122 deletions
|
@ -645,14 +645,14 @@ gen_repr(PyGenObject *gen)
|
|||
}
|
||||
|
||||
static PyObject *
|
||||
gen_get_name(PyGenObject *op)
|
||||
gen_get_name(PyGenObject *op, void *Py_UNUSED(ignored))
|
||||
{
|
||||
Py_INCREF(op->gi_name);
|
||||
return op->gi_name;
|
||||
}
|
||||
|
||||
static int
|
||||
gen_set_name(PyGenObject *op, PyObject *value)
|
||||
gen_set_name(PyGenObject *op, PyObject *value, void *Py_UNUSED(ignored))
|
||||
{
|
||||
/* Not legal to del gen.gi_name or to set it to anything
|
||||
* other than a string object. */
|
||||
|
@ -667,14 +667,14 @@ gen_set_name(PyGenObject *op, PyObject *value)
|
|||
}
|
||||
|
||||
static PyObject *
|
||||
gen_get_qualname(PyGenObject *op)
|
||||
gen_get_qualname(PyGenObject *op, void *Py_UNUSED(ignored))
|
||||
{
|
||||
Py_INCREF(op->gi_qualname);
|
||||
return op->gi_qualname;
|
||||
}
|
||||
|
||||
static int
|
||||
gen_set_qualname(PyGenObject *op, PyObject *value)
|
||||
gen_set_qualname(PyGenObject *op, PyObject *value, void *Py_UNUSED(ignored))
|
||||
{
|
||||
/* Not legal to del gen.__qualname__ or to set it to anything
|
||||
* other than a string object. */
|
||||
|
@ -689,7 +689,7 @@ gen_set_qualname(PyGenObject *op, PyObject *value)
|
|||
}
|
||||
|
||||
static PyObject *
|
||||
gen_getyieldfrom(PyGenObject *gen)
|
||||
gen_getyieldfrom(PyGenObject *gen, void *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *yf = _PyGen_yf(gen);
|
||||
if (yf == NULL)
|
||||
|
@ -926,7 +926,7 @@ coro_await(PyCoroObject *coro)
|
|||
}
|
||||
|
||||
static PyObject *
|
||||
coro_get_cr_await(PyCoroObject *coro)
|
||||
coro_get_cr_await(PyCoroObject *coro, void *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *yf = _PyGen_yf((PyGenObject *) coro);
|
||||
if (yf == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue