diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-11-27 09:58:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 09:58:07 -0800 |
commit | 5ceb7018dc63fab96f81d05e62bbe704e9f10cb9 (patch) | |
tree | 0cb8b6b5a3f6652b41b83003afa04a433f631385 /Objects/genobject.c | |
parent | d669154ee52048f98ac63ba177f3fd1cf62f0174 (diff) | |
download | cpython-git-5ceb7018dc63fab96f81d05e62bbe704e9f10cb9.tar.gz |
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
Fix also return type for few other functions (clear, releasebuffer).
(cherry picked from commit d4f9cf5545d6d8844e0726552ef2e366f5cc3abd)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r-- | Objects/genobject.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c index 793a809b84..b0e877072c 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -644,14 +644,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. */ @@ -666,14 +666,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. */ @@ -688,7 +688,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) @@ -927,7 +927,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) |