8000 bpo-38823: Fix compiler warning in _ctypes on Windows (GH-23258) · python/cpython@0cec97e · GitHub
[go: up one dir, main page]

Skip to content

Commit 0cec97e

Browse files
authored
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 *'
1 parent fd009e6 commit 0cec97e

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)
0