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 *'
This commit is contained in:
Victor Stinner 2020-11-13 14:44:11 +01:00 committed by GitHub
parent fd009e606a
commit 0cec97eb6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -5745,7 +5745,7 @@ _ctypes_add_types(PyObject *mod)
TYPE_READY(&StructParam_Type); TYPE_READY(&StructParam_Type);
#ifdef MS_WIN32 #ifdef MS_WIN32
TYPE_READY_BASE(&PyComError_Type, PyExc_Exception); TYPE_READY_BASE(&PyComError_Type, (PyTypeObject*)PyExc_Exception);
#endif #endif
#undef TYPE_READY #undef TYPE_READY