Skip to content

Check if the __debug macro has a value and avoid error C1017(invalid … #492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions include/boost/python/detail/wrap_python.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
// 01 Mar 01 define PyObject_INIT() for Python 1.x (Dave Abrahams)

#ifdef _DEBUG
#if _DEBUG
#define _DEBUG_HAS_VALUE
#endif
# ifndef BOOST_DEBUG_PYTHON
# ifdef _MSC_VER
// VC8.0 will complain if system headers are #included both with
Expand Down Expand Up @@ -206,7 +209,11 @@ typedef int pid_t;

#ifdef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
# undef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
#if defined(_DEBUG_HAS_VALUE)
# define _DEBUG 1
#else
# define _DEBUG
#endif
# ifdef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
# undef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
# undef _CRT_NOFORCE_MANIFEST
Expand Down
Loading