Skip to content

Commit c5cf576

Browse files
author
Ralf W. Grosse-Kunstleve
committed
_DEBUG/BOOST_DEBUG_PYTHON/DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H must appear before #include <pyconfig.h>
[SVN r24942]
1 parent bfd7f71 commit c5cf576

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

include/boost/python/detail/prefix.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
// Unfortunately, Boost.Python needs to #include <limits.h> first, at
1111
// least... but this gets us as close as possible.
1212

13-
# include <pyconfig.h>
14-
# if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION == 741
15-
# undef _POSIX_C_SOURCE
16-
# undef _XOPEN_SOURCE
17-
# endif
1813
# include <boost/python/detail/wrap_python.hpp>
1914
# include <boost/python/detail/config.hpp>
2015

include/boost/python/detail/wrap_python.hpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@
2020
// 04 Mar 01 Rolled in some changes from the Dragon fork (Dave Abrahams)
2121
// 01 Mar 01 define PyObject_INIT() for Python 1.x (Dave Abrahams)
2222

23+
#ifdef _DEBUG
24+
# ifndef BOOST_DEBUG_PYTHON
25+
# undef _DEBUG // Don't let Python force the debug library just because we're debugging.
26+
# define DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
27+
# endif
28+
#endif
29+
30+
# include <pyconfig.h>
31+
# if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION == 741
32+
# undef _POSIX_C_SOURCE
33+
# undef _XOPEN_SOURCE
34+
# endif
35+
2336
//
2437
// Python's LongObject.h helpfully #defines ULONGLONG_MAX for us,
2538
// which confuses Boost's config
@@ -44,13 +57,6 @@
4457
#error Python 2.2 or higher is required for this version of Boost.Python.
4558
#endif
4659

47-
#ifdef _DEBUG
48-
# ifndef BOOST_DEBUG_PYTHON
49-
# undef _DEBUG // Don't let Python force the debug library just because we're debugging.
50-
# define DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
51-
# endif
52-
#endif
53-
5460
//
5561
// Some things we need in order to get Python.h to work with compilers other
5662
// than MSVC on Win32

0 commit comments

Comments
 (0)