From: Victor Stinner Date: Fri, 13 Nov 2020 13:44:11 +0000 (+0100) Subject: bpo-38823: Fix compiler warning in _ctypes on Windows (GH-23258) X-Git-Tag: v3.10.0a3~213 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0cec97eb6a3e31493c29ef9398fcf39a5ec445a6;p=thirdparty%2FPython%2Fcpython.git bpo-38823: Fix compiler warning in _ctypes on Windows (GH-23258) Explicitly cast PyExc_Exception to PyTypeObject* to fix the warning: modules\_ctypes\_ctypes.c(5748): warning C4133: '=': incompatible types - from 'PyObject *' to '_typeobject *' --- diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 8bb34877c539..5f8a723f6373 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