diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 8bb34877c53..5f8a723f637 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -5745,7 +5745,7 @@ _ctypes_add_types(PyObject *mod) TYPE_READY(&StructParam_Type); #ifdef MS_WIN32 - TYPE_READY_BASE(&PyComError_Type, PyExc_Exception); + TYPE_READY_BASE(&PyComError_Type, (PyTypeObject*)PyExc_Exception); #endif #undef TYPE_READY