mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
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) {
|
if (op == NULL) {
|
||||||
return PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
}
|
}
|
||||||
_PyObject_Init(op, &PyHKEY_Type);
|
_PyObject_Init((PyObject*)op, &PyHKEY_Type);
|
||||||
op->hkey = h;
|
op->hkey = h;
|
||||||
return (PyObject *)op;
|
return (PyObject *)op;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue