bpo-38823: Fix compiler warning in _ctypes on Windows (GH-23258) · python/cpython@0cec97e

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 0cec97e

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

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)