From bede0b407b454c06110145fc2e624fb2468fd91a Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Thu, 27 Jan 2022 08:24:05 +1300 Subject: [PATCH] [python] Workaround MSVC2022-related bug Fixes #2090 --- Lib/python/pyruntime.swg | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lib/python/pyruntime.swg b/Lib/python/pyruntime.swg index 751bc8d5f..843fa6ce1 100644 --- a/Lib/python/pyruntime.swg +++ b/Lib/python/pyruntime.swg @@ -4,6 +4,13 @@ # include #endif +#if defined(_MSC_VER) && _MSC_VER >= 1930 +/* Workaround what seems to be a bug in the Python headers with MSVC 2022. + * https://github.com/swig/swig/issues/2090 + */ +# include +#endif + #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) /* Use debug wrappers with the Python release dll */ # undef _DEBUG