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.swg12
1 files changed, 9 insertions, 3 deletions
diff --git a/Lib/python/pyruntime.swg b/Lib/python/pyruntime.swg
index dd22a1fdf..b0c4f5741 100644
--- a/Lib/python/pyruntime.swg
+++ b/Lib/python/pyruntime.swg
@@ -1,6 +1,12 @@
%insert(runtime) %{
-/* Python.h has to appear first */
-#include <Python.h>
+#if defined(_DEBUG) && defined(SWIG_PYTHON_NO_DEBUG)
+/* Use debug wrappers with the Python release dll */
+# undef _DEBUG
+# include <Python.h>
+# define _DEBUG
+#else
+# include <Python.h>
+#endif
%}
%insert(runtime) "swigrun.swg"; /* SWIG API */
@@ -13,4 +19,4 @@
#if defined(SWIGPYTHON_BUILTIN)
%insert(runtime) "builtin.swg"; /* Specialization for classes with single inheritance */
-#endif \ No newline at end of file
+#endif