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>
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index f518dc4..4ef10d0 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -64,7 +64,7 @@
* 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;
@@ -519,7 +519,7 @@
return 0;
}
-static void
+static int
frame_tp_clear(PyFrameObject *f)
{
PyObject **fastlocals, **p, **oldtop;
@@ -547,6 +547,7 @@
for (p = f->f_valuestack; p < oldtop; p++)
Py_CLEAR(*p);
}
+ return 0;
}
static PyObject *
@@ -561,7 +562,7 @@
_PyGen_Finalize(f->f_gen);
assert(f->f_gen == NULL);
}
- frame_tp_clear(f);
+ (void)frame_tp_clear(f);
Py_RETURN_NONE;
}