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/PC/winreg.c b/PC/winreg.c
index 78864b1..4f5a676 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -459,7 +459,7 @@
op = (PyHKEYObject *) PyObject_MALLOC(sizeof(PyHKEYObject));
if (op == NULL)
return PyErr_NoMemory();
- PyObject_INIT(op, &PyHKEY_Type);
+ PyObject_INIT((PyObject *)op, &PyHKEY_Type);
op->hkey = h;
return (PyObject *)op;
}