summaryrefslogtreecommitdiffstats
path: root/Objects/genobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 17:34:35 (GMT)
committerGitHub <noreply@github.com>2018-11-27 17:34:35 (GMT)
commitd4f9cf5545d6d8844e0726552ef2e366f5cc3abd (patch)
tree7aefae9861ee6b83652f6a352397b9dc145cc0d3 /Objects/genobject.c
parent1005c84535191a72ebb7587d8c5636a065b7ed79 (diff)
downloadcpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.zip
cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.tar.gz
cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.tar.bz2
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
Fix also return type for few other functions (clear, releasebuffer).
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r--Objects/genobject.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 3279a09..e2def38 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -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)