Prepare swig for running pyauto on win.

Work around a weird python nag on win. Python.h uses a _DEBUG macro to conditionally load debug version of the python lib. This conflicts with MSVS which defines _DEBUG in Debug configuration.
This change works around this problem by including Python.h without the _DEBUG macro, since we don't want to debug python itself in any case. 

Accompanying CL in Cr src: http://codereview.chromium.org/661342
Review URL: http://codereview.chromium.org/661334

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/swig/Lib@40423 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
diff --git a/python/pyruntime.swg b/python/pyruntime.swg
index 00f15a1..02de816 100644
--- a/python/pyruntime.swg
+++ b/python/pyruntime.swg
@@ -1,6 +1,19 @@
 %insert(runtime) %{
 /* Python.h has to appear first */
+// Resolve conflicting use of _DEBUG across projects.
+// #defining _DEBUG causes Python.h to require pythonXX_d.lib (instead
+// of pythonXX.lib).
+// MSVC #defines _DEBUG for Debug configuration.
+// Make sure our project, which uses the latter, doesn't trigger the
+// former since we don't want to debug python itself.
+// (http://old.nabble.com/problems-with-python24_d.lib-td4760095.html#a4760095)
+#ifdef _DEBUG
+#undef _DEBUG
 #include <Python.h>
+#define _DEBUG
+#else
+#include <Python.h>
+#endif
 %}
 
 %insert(runtime) "swigrun.swg";         /* SWIG API */