bpo-40989: Fix compiler warning in winreg.c (GH-21722)
Explicitly cast PyHKEYObject* to PyObject* to call _PyObject_Init().
This commit is contained in:
parent
8f4380d2f5
commit
15edaecd97
|
@ -463,7 +463,7 @@ PyHKEY_FromHKEY(HKEY h)
|
|||
if (op == NULL) {
|
||||
return PyErr_NoMemory();
|
||||
}
|
||||
_PyObject_Init(op, &PyHKEY_Type);
|
||||
_PyObject_Init((PyObject*)op, &PyHKEY_Type);
|
||||
op->hkey = h;
|
||||
return (PyObject *)op;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue