Skip to content

Commit bed2c8a

Browse files
committed
no message
[SVN r12076]
1 parent e65ca4c commit bed2c8a

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

include/boost/python/detail/config.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@
5757
# define BOOST_CSTD_ std
5858
# endif
5959

60-
#if defined(_WIN32) || defined(__CYGWIN__)
61-
# define BOOST_PYTHON_MODULE_INIT(name) void init_module_##name(); extern "C" __declspec(dllexport) void init##name() { boost::python::handle_exception(init_module_##name); } void init_module_##name()
62-
#else
63-
# define BOOST_PYTHON_MODULE_INIT(name) void init_module_##name(); extern "C" void init##name() { boost::python::handle_exception(init_module_##name); } void init_module_##name()
64-
#endif
60+
# ifndef BOOST_PYTHON_MODULE_INIT
61+
# if defined(_WIN32) || defined(__CYGWIN__)
62+
# define BOOST_PYTHON_MODULE_INIT(name) void init_module_##name(); extern "C" __declspec(dllexport) void init##name() { boost::python::handle_exception(init_module_##name); } void init_module_##name()
63+
# else
64+
# define BOOST_PYTHON_MODULE_INIT(name) void init_module_##name(); extern "C" void init##name() { boost::python::handle_exception(init_module_##name); } void init_module_##name()
65+
# endif
66+
# endif
6567

6668
#endif // CONFIG_DWA052200_H_

include/boost/python/detail/wrap_python.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,25 @@ typedef int pid_t;
7272
# define _MSC_VER 900
7373
# endif
7474

75-
# if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 2
75+
# if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 2
7676
# include <config.h>
7777
# else
7878
# include <pyconfig.h>
7979
# endif
8080
# undef hypot // undo the evil #define left by Python.
8181

8282
# elif defined(__BORLANDC__)
83-
# if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 2
83+
# if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 2
8484
# include <config.h>
8585
# else
8686
# include <pyconfig.h>
8787
# endif
8888
# undef HAVE_HYPOT
8989
# define HAVE_HYPOT 1
9090
# elif defined(_MSC_VER)
91-
# include <limits> // prevents Python.h from defining LONGLONG_MAX, LONGLONG_MIN, and ULONGLONG_MAX
91+
# ifdef __cplusplus
92+
# include <limits> // prevents Python.h from defining LONGLONG_MAX, LONGLONG_MIN, and ULONGLONG_MAX
93+
# endif
9294
# endif
9395

9496
#endif // _WIN32

0 commit comments

Comments
 (0)