Skip to content

Commit

Permalink
bpo-38823: Fix compiler warning in _ctypes on Windows (GH-23258)
Browse files Browse the repository at this point in the history
Explicitly cast PyExc_Exception to PyTypeObject* to fix the warning:

    modules\_ctypes\_ctypes.c(5748): warning C4133: '=':
    incompatible types - from 'PyObject *' to '_typeobject *'
  • Loading branch information
vstinner committed Nov 13, 2020
1 parent fd009e6 commit 0cec97e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/_ctypes/_ctypes.c
Expand Up @@ -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
Expand Down

0 comments on commit 0cec97e

Please sign in to comment.