]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-115882: Reference Unknwn.h for ctypes on Windows (GH-115350)
authorYuriy Chernyshov <thegeorg@yandex-team.com>
Mon, 26 Feb 2024 17:21:55 +0000 (18:21 +0100)
committerGitHub <noreply@github.com>
Mon, 26 Feb 2024 17:21:55 +0000 (17:21 +0000)
This allows the module to be compiled with WIN32_LEAN_AND_MEAN enabled

Misc/NEWS.d/next/Build/2024-02-24-12-50-43.gh-issue-115350.naQA6y.rst [new file with mode: 0644]
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 (file)
index 0000000..5492a80
--- /dev/null
@@ -0,0 +1 @@
+Fix building ctypes module with -DWIN32_LEAN_AND_MEAN defined
index 1989723f6f3dbb16aab207146f19eea3c9abcf62..02f48a9ed55843cf974a64f65c4232f2752c9b91 100644 (file)
 #endif
 #endif
 
+#ifdef MS_WIN32
+#include <Unknwn.h> // for IUnknown interface
+#endif
+
 typedef struct {
     PyTypeObject *DictRemover_Type;
     PyTypeObject *PyCArg_Type;