Skip to content

Commit

Permalink
pythongh-115882: Reference Unknwn.h for ctypes on Windows (pythonGH-1…
Browse files Browse the repository at this point in the history
…15350)

This allows the module to be compiled with WIN32_LEAN_AND_MEAN enabled
  • Loading branch information
georgthegreat authored and woodruffw committed Mar 4, 2024
1 parent bd9f19e commit 7a89c9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix building ctypes module with -DWIN32_LEAN_AND_MEAN defined
4 changes: 4 additions & 0 deletions Modules/_ctypes/ctypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
#endif
#endif

#ifdef MS_WIN32
#include <Unknwn.h> // for IUnknown interface
#endif

typedef struct {
PyTypeObject *DictRemover_Type;
PyTypeObject *PyCArg_Type;
Expand Down

0 comments on commit 7a89c9b

Please sign in to comment.