Python: support building again version 3.9 (unreleased)

Resolves T78089, no functional changes.
This commit is contained in:
2020-06-22 14:51:20 +10:00
parent f2b5f731d5
commit 56d0df51a3
3 changed files with 20 additions and 16 deletions

View File

@@ -96,10 +96,10 @@ static PyObject *Vector_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return Vector_CreatePyObject_alloc(vec, size, type);
}
static PyObject *vec__apply_to_copy(PyNoArgsFunction vec_func, VectorObject *self)
static PyObject *vec__apply_to_copy(PyObject *(*vec_func)(VectorObject *), VectorObject *self)
{
PyObject *ret = Vector_copy(self);
PyObject *ret_dummy = vec_func(ret);
PyObject *ret_dummy = vec_func((VectorObject *)ret);
if (ret_dummy) {
Py_DECREF(ret_dummy);
return (PyObject *)ret;
@@ -376,7 +376,7 @@ PyDoc_STRVAR(Vector_normalized_doc,
" :rtype: :class:`Vector`\n");
static PyObject *Vector_normalized(VectorObject *self)
{
return vec__apply_to_copy((PyNoArgsFunction)Vector_normalize, self);
return vec__apply_to_copy(Vector_normalize, self);
}
PyDoc_STRVAR(Vector_resize_doc,