https://github.com/python/cpython/commit/96c10c648565c7406d5606099dbbb937310c26dc
commit: 96c10c648565c7406d5606099dbbb937310c26dc
branch: main
author: Yuriy Chernyshov <[email protected]>
committer: zooba <[email protected]>
date: 2024-02-26T17:21:55Z
summary:
gh-115882: Reference Unknwn.h for ctypes on Windows (GH-115350)
This allows the module to be compiled with WIN32_LEAN_AND_MEAN enabled
files:
A Misc/NEWS.d/next/Build/2024-02-24-12-50-43.gh-issue-115350.naQA6y.rst
M Modules/_ctypes/ctypes.h
diff --git
a/Misc/NEWS.d/next/Build/2024-02-24-12-50-43.gh-issue-115350.naQA6y.rst
b/Misc/NEWS.d/next/Build/2024-02-24-12-50-43.gh-issue-115350.naQA6y.rst
new file mode 100644
index 00000000000000..5492a804255838
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2024-02-24-12-50-43.gh-issue-115350.naQA6y.rst
@@ -0,0 +1 @@
+Fix building ctypes module with -DWIN32_LEAN_AND_MEAN defined
diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h
index 1989723f6f3dbb..02f48a9ed55843 100644
--- a/Modules/_ctypes/ctypes.h
+++ b/Modules/_ctypes/ctypes.h
@@ -32,6 +32,10 @@
#endif
#endif
+#ifdef MS_WIN32
+#include <Unknwn.h> // for IUnknown interface
+#endif
+
typedef struct {
PyTypeObject *DictRemover_Type;
PyTypeObject *PyCArg_Type;
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]