Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: swig/Lib/python/pyruntime.swg

Issue 661334: Prepare swig for building pyauto on win (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: swig/Lib/python/pyruntime.swg
===================================================================
--- swig/Lib/python/pyruntime.swg (revision 40349)
+++ swig/Lib/python/pyruntime.swg (working copy)
@@ -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 */
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698