Skip to content

Commit 96c10c6

Browse files
gh-115882: Reference Unknwn.h for ctypes on Windows (GH-115350)
This allows the module to be compiled with WIN32_LEAN_AND_MEAN enabled
1 parent c0fdfba commit 96c10c6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix building ctypes module with -DWIN32_LEAN_AND_MEAN defined

Modules/_ctypes/ctypes.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
#endif
3333
#endif
3434

35+
#ifdef MS_WIN32
36+
#include <Unknwn.h> // for IUnknown interface
37+
#endif
38+
3539
typedef struct {
3640
PyTypeObject *DictRemover_Type;
3741
PyTypeObject *PyCArg_Type;

0 commit comments

Comments
 (0)