From: Victor Stinner Date: Wed, 5 Aug 2020 14:23:10 +0000 (+0200) Subject: bpo-40989: Fix compiler warning in winreg.c (GH-21722) X-Git-Tag: v3.10.0a1~306 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15edaecd97a3f8e82895046462342d8ddd8b9f1b;p=thirdparty%2FPython%2Fcpython.git bpo-40989: Fix compiler warning in winreg.c (GH-21722) Explicitly cast PyHKEYObject* to PyObject* to call _PyObject_Init(). --- diff --git a/PC/winreg.c b/PC/winreg.c index a24d784c773c..78c08693a8ac 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; }