mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
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:
parent
1005c84535
commit
d4f9cf5545
25 changed files with 128 additions and 122 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue