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:
Serhiy Storchaka 2018-11-27 19:34:35 +02:00 committed by GitHub
parent 1005c84535
commit d4f9cf5545
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 128 additions and 122 deletions

View file

@ -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;
}