From 15edaecd97a3f8e82895046462342d8ddd8b9f1b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 5 Aug 2020 16:23:10 +0200 Subject: bpo-40989: Fix compiler warning in winreg.c (GH-21722) Explicitly cast PyHKEYObject* to PyObject* to call _PyObject_Init(). --- PC/winreg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PC/winreg.c b/PC/winreg.c index a24d784..78c0869 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -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; } -- cgit v0.12