Skip to content

Commit 15edaec

Browse files
authored
bpo-40989: Fix compiler warning in winreg.c (GH-21722)
Explicitly cast PyHKEYObject* to PyObject* to call _PyObject_Init().
1 parent 8f4380d commit 15edaec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PC/winreg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ PyHKEY_FromHKEY(HKEY h)
463463
if (op == NULL) {
464464
return PyErr_NoMemory();
465465
}
466-
_PyObject_Init(op, &PyHKEY_Type);
466+
_PyObject_Init((PyObject*)op, &PyHKEY_Type);
467467
op->hkey = h;
468468
return (PyObject *)op;
469469
}

0 commit comments

Comments
 (0)