Skip to content

Commit 15767b2

Browse files
vstinneradorilson
authored andcommitted
bpo-38823: Fix compiler warning in _ctypes on Windows (pythonGH-23258)
Explicitly cast PyExc_Exception to PyTypeObject* to fix the warning: modules\_ctypes\_ctypes.c(5748): warning C4133: '=': incompatible types - from 'PyObject *' to '_typeobject *'
1 parent 0e5c9d5 commit 15767b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_ctypes/_ctypes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5745,7 +5745,7 @@ _ctypes_add_types(PyObject *mod)
57455745
TYPE_READY(&StructParam_Type);
57465746

57475747
#ifdef MS_WIN32
5748-
TYPE_READY_BASE(&PyComError_Type, PyExc_Exception);
5748+
TYPE_READY_BASE(&PyComError_Type, (PyTypeObject*)PyExc_Exception);
57495749
#endif
57505750

57515751
#undef TYPE_READY

0 commit comments

Comments
 (0)