bpo-35059: Convert PyObject_INIT() to function (GH-10077)
* Convert PyObject_INIT() and PyObject_INIT_VAR() macros to static
inline functions.
* Fix usage of these functions: cast to PyObject* or PyVarObject*.
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index 5ad2831..9176e39 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -31,7 +31,7 @@
op = free_list;
if (op != NULL) {
free_list = (PyCFunctionObject *)(op->m_self);
- (void)PyObject_INIT(op, &PyCFunction_Type);
+ (void)PyObject_INIT((PyObject *)op, &PyCFunction_Type);
numfree--;
}
else {