From 00a482b8964142042b2576aa12c0c7b06303e16f Mon Sep 17 00:00:00 2001 From: John Stark Date: Thu, 17 Nov 2011 11:48:24 +0100 Subject: [PATCH 1/2] Copied most of the contents of vtkPython.h to dPython.h. --- src/dPython.h | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/dPython.h b/src/dPython.h index 2ee9ec81..6511c58e 100644 --- a/src/dPython.h +++ b/src/dPython.h @@ -60,14 +60,34 @@ */ #ifdef _DEBUG -# undef _DEBUG -# if defined(_MSC_VER) && _MSC_VER >= 1400 -# define _CRT_NOFORCE_MANIFEST 1 -# endif -# include -# define _DEBUG +// Include these low level headers before undefing _DEBUG. Otherwise when doing +// a debug build against a release build of python the compiler will end up +// including these low level headers without DEBUG enabled, causing it to try +// and link release versions of this low level C api. +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# undef _DEBUG +# if defined(_MSC_VER) && _MSC_VER >= 1400 +# define _CRT_NOFORCE_MANIFEST 1 +# endif +# include +# define _DEBUG #else -# include +# include #endif + #endif From 08d07d030d7a69bc0064c89fcfc99d582215725f Mon Sep 17 00:00:00 2001 From: John Stark Date: Thu, 17 Nov 2011 12:22:26 +0100 Subject: [PATCH 2/2] STYLE: Consistent indent. --- src/dPython.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dPython.h b/src/dPython.h index 6511c58e..1aa6e911 100644 --- a/src/dPython.h +++ b/src/dPython.h @@ -79,14 +79,14 @@ # include # include # include -# undef _DEBUG -# if defined(_MSC_VER) && _MSC_VER >= 1400 -# define _CRT_NOFORCE_MANIFEST 1 -# endif -# include -# define _DEBUG +# undef _DEBUG +# if defined(_MSC_VER) && _MSC_VER >= 1400 +# define _CRT_NOFORCE_MANIFEST 1 +# endif +# include +# define _DEBUG #else -# include +# include #endif