/* teamtrack-python.h -- wrapper around Python.h Gareth Rees, Ravenbrook Limited, 2000-08-07 $Id: //info.ravenbrook.com/project/p4dti/version/0.2/code/python-teamtrack-interface/teamtrack-python.h#1 $ Include this file instead of Python.h */ #if !defined(TEAMTRACK_PYTHON_H) #define TEAMTRACK_PYTHON_H /* Under Windows, Python.h tells Visual C++ to link with python15_d.lib when _DEBUG is defined. Unfortunately all the executables in the Python distribution are linked with python15.lib. Any extensions must be linked with the same Python library as the executable they are run from, so to use python15_d.lib we would have to build debugging versions of all the Python executables we use (and any extensions we use). Presumably this is convenient for the Python developers, but it's a royal pain for their users. We undefine _DEBUG while including the Python header to avoid this brain damage. See "Programming Python on Win32" chapter 22. */ #if defined(WIN32) && defined(_DEBUG) #undef _DEBUG #include "Python.h" #define _DEBUG #else /* !(defined(WIN32) && defined(_DEBUG)) */ #include "Python.h" #endif /* defined(WIN32) && defined(_DEBUG) */ #endif /* !defined(TEAMTRACK_PYTHON_H) */