diff options
| author | thegeorg <[email protected]> | 2024-02-27 01:51:42 +0300 | 
|---|---|---|
| committer | thegeorg <[email protected]> | 2024-02-27 02:04:39 +0300 | 
| commit | 6fa64684d15341dd701bf1498ecafdd764d5f097 (patch) | |
| tree | 344e0ac8f1a41f7553078a303fac90d6e76312ad /contrib/tools/python3/Modules | |
| parent | 513c484bfeaa01ce1ac67ef6146d03c08a7d3b4d (diff) | |
Better patch around #include <Unknwn.h>
Backport of [PR #115350](https://github.com/python/cpython/pull/115350.patch) from CPython upstream.
7a2729f31048ba63762a6d3a890308c23db5c969
Diffstat (limited to 'contrib/tools/python3/Modules')
| -rw-r--r-- | contrib/tools/python3/Modules/_ctypes/_ctypes.c | 1 | ||||
| -rw-r--r-- | contrib/tools/python3/Modules/_ctypes/callbacks.c | 1 | ||||
| -rw-r--r-- | contrib/tools/python3/Modules/_ctypes/callproc.c | 1 | ||||
| -rw-r--r-- | contrib/tools/python3/Modules/_ctypes/cfield.c | 1 | ||||
| -rw-r--r-- | contrib/tools/python3/Modules/_ctypes/ctypes.h | 4 | ||||
| -rw-r--r-- | contrib/tools/python3/Modules/_ctypes/stgdict.c | 1 | 
6 files changed, 4 insertions, 5 deletions
diff --git a/contrib/tools/python3/Modules/_ctypes/_ctypes.c b/contrib/tools/python3/Modules/_ctypes/_ctypes.c index 05de939b7a0..c5157560f6e 100644 --- a/contrib/tools/python3/Modules/_ctypes/_ctypes.c +++ b/contrib/tools/python3/Modules/_ctypes/_ctypes.c @@ -107,7 +107,6 @@ bytes(cdata)  // windows.h must be included before pycore internal headers  #ifdef MS_WIN32  #  include <windows.h> -#  include <Unknwn.h>  #endif  #include "pycore_call.h"          // _PyObject_CallNoArgs() diff --git a/contrib/tools/python3/Modules/_ctypes/callbacks.c b/contrib/tools/python3/Modules/_ctypes/callbacks.c index 58f6249f8df..d71297f9c5c 100644 --- a/contrib/tools/python3/Modules/_ctypes/callbacks.c +++ b/contrib/tools/python3/Modules/_ctypes/callbacks.c @@ -6,7 +6,6 @@  // windows.h must be included before pycore internal headers  #ifdef MS_WIN32  #  include <windows.h> -#  include <Unknwn.h>  #endif  #include "pycore_call.h"            // _PyObject_CallNoArgs() diff --git a/contrib/tools/python3/Modules/_ctypes/callproc.c b/contrib/tools/python3/Modules/_ctypes/callproc.c index b46ccc2d86a..d2fe525dd4d 100644 --- a/contrib/tools/python3/Modules/_ctypes/callproc.c +++ b/contrib/tools/python3/Modules/_ctypes/callproc.c @@ -65,7 +65,6 @@  #ifdef MS_WIN32  #include <windows.h> -#include <Unknwn.h>  #include <tchar.h>  #else  #include <dlfcn.h> diff --git a/contrib/tools/python3/Modules/_ctypes/cfield.c b/contrib/tools/python3/Modules/_ctypes/cfield.c index ebca11e5968..128506a9eed 100644 --- a/contrib/tools/python3/Modules/_ctypes/cfield.c +++ b/contrib/tools/python3/Modules/_ctypes/cfield.c @@ -6,7 +6,6 @@  // windows.h must be included before pycore internal headers  #ifdef MS_WIN32  #  include <windows.h> -#  include <Unknwn.h>  #endif  #include "pycore_bitutils.h"      // _Py_bswap32() diff --git a/contrib/tools/python3/Modules/_ctypes/ctypes.h b/contrib/tools/python3/Modules/_ctypes/ctypes.h index 8891a0a741d..aed4dffe074 100644 --- a/contrib/tools/python3/Modules/_ctypes/ctypes.h +++ b/contrib/tools/python3/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; diff --git a/contrib/tools/python3/Modules/_ctypes/stgdict.c b/contrib/tools/python3/Modules/_ctypes/stgdict.c index 57f4b0040c7..ae3f356c2e0 100644 --- a/contrib/tools/python3/Modules/_ctypes/stgdict.c +++ b/contrib/tools/python3/Modules/_ctypes/stgdict.c @@ -6,7 +6,6 @@  // windows.h must be included before pycore internal headers  #ifdef MS_WIN32  #  include <windows.h> -#  include <Unknwn.h>  #endif  #include "pycore_call.h"          // _PyObject_CallNoArgs()  | 
