summaryrefslogtreecommitdiffstats
path: root/PC/winreg.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-08-05 14:23:10 (GMT)
committerGitHub <noreply@github.com>2020-08-05 14:23:10 (GMT)
commit15edaecd97a3f8e82895046462342d8ddd8b9f1b (patch)
treea41e1555a72935c8f6d563fb5ba60bd4770c248d /PC/winreg.c
parent8f4380d2f5839a321475104765221a7394a9d649 (diff)
downloadcpython-15edaecd97a3f8e82895046462342d8ddd8b9f1b.zip
cpython-15edaecd97a3f8e82895046462342d8ddd8b9f1b.tar.gz
cpython-15edaecd97a3f8e82895046462342d8ddd8b9f1b.tar.bz2
bpo-40989: Fix compiler warning in winreg.c (GH-21722)
Explicitly cast PyHKEYObject* to PyObject* to call _PyObject_Init().
Diffstat (limited to 'PC/winreg.c')
-rw-r--r--PC/winreg.c2
1 files changed, 1 insertions, 1 deletions
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;
}