2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-22 05:22:45 +00:00

_DEBUG/BOOST_DEBUG_PYTHON/DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H must appear before #include <pyconfig.h>

[SVN r24942]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2004-09-06 18:42:41 +00:00
parent bfd7f71601
commit c5cf576deb
2 changed files with 13 additions and 12 deletions

View File

@@ -10,11 +10,6 @@
// Unfortunately, Boost.Python needs to #include <limits.h> first, at
// least... but this gets us as close as possible.
# include <pyconfig.h>
# if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION == 741
# undef _POSIX_C_SOURCE
# undef _XOPEN_SOURCE
# endif
# include <boost/python/detail/wrap_python.hpp>
# include <boost/python/detail/config.hpp>

View File

@@ -20,6 +20,19 @@
// 04 Mar 01 Rolled in some changes from the Dragon fork (Dave Abrahams)
// 01 Mar 01 define PyObject_INIT() for Python 1.x (Dave Abrahams)
#ifdef _DEBUG
# ifndef BOOST_DEBUG_PYTHON
# undef _DEBUG // Don't let Python force the debug library just because we're debugging.
# define DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
# endif
#endif
# include <pyconfig.h>
# if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION == 741
# undef _POSIX_C_SOURCE
# undef _XOPEN_SOURCE
# endif
//
// Python's LongObject.h helpfully #defines ULONGLONG_MAX for us,
// which confuses Boost's config
@@ -44,13 +57,6 @@
#error Python 2.2 or higher is required for this version of Boost.Python.
#endif
#ifdef _DEBUG
# ifndef BOOST_DEBUG_PYTHON
# undef _DEBUG // Don't let Python force the debug library just because we're debugging.
# define DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
# endif
#endif
//
// Some things we need in order to get Python.h to work with compilers other
// than MSVC on Win32