aboutsummaryrefslogtreecommitdiff
path: root/Lib/python/pyruntime.swg
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/python/pyruntime.swg')
-rw-r--r--Lib/python/pyruntime.swg7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/python/pyruntime.swg b/Lib/python/pyruntime.swg
index fad97be9f..751bc8d5f 100644
--- a/Lib/python/pyruntime.swg
+++ b/Lib/python/pyruntime.swg
@@ -1,9 +1,14 @@
%insert(runtime) %{
+#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
+/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
+# include <math.h>
+#endif
+
#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
-# define _DEBUG
+# define _DEBUG 1
#else
# include <Python.h>
#endif