commit | 15edaecd97a3f8e82895046462342d8ddd8b9f1b | [log] [tgz] |
---|---|---|
author | Victor Stinner <vstinner@python.org> | Wed Aug 05 16:23:10 2020 +0200 |
committer | GitHub <noreply@github.com> | Wed Aug 05 16:23:10 2020 +0200 |
tree | a41e1555a72935c8f6d563fb5ba60bd4770c248d | |
parent | 8f4380d2f5839a321475104765221a7394a9d649 [diff] [blame] |
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 a24d784..78c0869 100644 --- a/PC/winreg.c +++ b/PC/winreg.c
@@ -463,7 +463,7 @@ if (op == NULL) { return PyErr_NoMemory(); } - _PyObject_Init(op, &PyHKEY_Type); + _PyObject_Init((PyObject*)op, &PyHKEY_Type); op->hkey = h; return (PyObject *)op; }