From: Yuriy Chernyshov Date: Mon, 26 Feb 2024 17:21:55 +0000 (+0100) Subject: gh-115882: Reference Unknwn.h for ctypes on Windows (GH-115350) X-Git-Tag: v3.13.0a5~229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96c10c648565c7406d5606099dbbb937310c26dc;p=thirdparty%2FPython%2Fcpython.git gh-115882: Reference Unknwn.h for ctypes on Windows (GH-115350) This allows the module to be compiled with WIN32_LEAN_AND_MEAN enabled --- 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 000000000000..5492a8042558 --- /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 1989723f6f3d..02f48a9ed558 100644 --- a/Modules/_ctypes/ctypes.h +++ b/Modules/_ctypes/ctypes.h @@ -32,6 +32,10 @@ #endif #endif +#ifdef MS_WIN32 +#include // for IUnknown interface +#endif + typedef struct { PyTypeObject *DictRemover_Type; PyTypeObject *PyCArg_Type;