bpo-35059: PyObject_INIT() casts to PyObject* (GH-10674)

PyObject_INIT() and PyObject_INIT_VAR() now cast their first argument
to PyObject*, as done in Python 3.7.

Revert partially commit b4435e20a9.
This commit is contained in:
Victor Stinner 2018-11-23 14:27:38 +01:00 committed by GitHub
parent 353933e712
commit b509d52083
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 12 deletions

View file

@ -32,7 +32,7 @@ PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module)
op = free_list;
if (op != NULL) {
free_list = (PyCFunctionObject *)(op->m_self);
(void)PyObject_INIT((PyObject *)op, &PyCFunction_Type);
(void)PyObject_INIT(op, &PyCFunction_Type);
numfree--;
}
else {