summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.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/frameobject.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/frameobject.c')
-rw-r--r--Objects/frameobject.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index b1a83d8..400f99f 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -87,7 +87,7 @@ get_arg(const _Py_CODEUNIT *codestr, Py_ssize_t i)
* that time.
*/
static int
-frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
+frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno, void *Py_UNUSED(ignored))
{
int new_lineno = 0; /* The new value of f_lineno */
long l_new_lineno;
@@ -470,7 +470,7 @@ frame_traverse(PyFrameObject *f, visitproc visit, void *arg)
return 0;
}
-static void
+static int
frame_tp_clear(PyFrameObject *f)
{
PyObject **fastlocals, **p, **oldtop;
@@ -498,6 +498,7 @@ frame_tp_clear(PyFrameObject *f)
for (p = f->f_valuestack; p < oldtop; p++)
Py_CLEAR(*p);
}
+ return 0;
}
static PyObject *
@@ -512,7 +513,7 @@ frame_clear(PyFrameObject *f, PyObject *Py_UNUSED(ignored))
_PyGen_Finalize(f->f_gen);
assert(f->f_gen == NULL);
}
- frame_tp_clear(f);
+ (void)frame_tp_clear(f);
Py_RETURN_NONE;
}