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/classobject.c b/Objects/classobject.c
index a193ada..c4efaf2 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -55,7 +55,7 @@
     im = free_list;
     if (im != NULL) {
         free_list = (PyMethodObject *)(im->im_self);
-        (void)PyObject_INIT(im, &PyMethod_Type);
+        (void)PyObject_INIT((PyObject *)im, &PyMethod_Type);
         numfree--;
     }
     else {