Skip to content

Commit 0224f54

Browse files
jhunoldstefanseefeld
authored andcommitted
Switch^Cisibility support to BOOST_SYMBOL_EXPORT. Refs #2114
1 parent d14b8cf commit 0224f54

5 files changed

Lines changed: 13 additions & 26 deletions

File tree

include/boost/python/detail/config.hpp

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -64,43 +64,30 @@
6464
#endif
6565

6666
#if defined(BOOST_PYTHON_DYNAMIC_LIB)
67-
68-
# if !defined(_WIN32) && !defined(__CYGWIN__) \
69-
&& !defined(BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY) \
70-
&& BOOST_WORKAROUND(__GNUC__, >= 3) && (__GNUC_MINOR__ >=5 || __GNUC__ > 3)
71-
# define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 1
72-
# endif
73-
74-
# if BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY
67+
# if defined(BOOST_SYMBOL_EXPORT)
7568
# if defined(BOOST_PYTHON_SOURCE)
76-
# define BOOST_PYTHON_DECL __attribute__ ((__visibility__("default")))
69+
# define BOOST_PYTHON_DECL BOOST_SYMBOL_EXPORT
70+
# define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_EXPORT
71+
# define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_EXPORT
7772
# define BOOST_PYTHON_BUILD_DLL
7873
# else
79-
# define BOOST_PYTHON_DECL
80-
# endif
81-
# define BOOST_PYTHON_DECL_FORWARD
82-
# define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((__visibility__("default")))
83-
# elif (defined(_WIN32) || defined(__CYGWIN__))
84-
# if defined(BOOST_PYTHON_SOURCE)
85-
# define BOOST_PYTHON_DECL __declspec(dllexport)
86-
# define BOOST_PYTHON_BUILD_DLL
87-
# else
88-
# define BOOST_PYTHON_DECL __declspec(dllimport)
74+
# define BOOST_PYTHON_DECL BOOST_SYMBOL_IMPORT
75+
# define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_IMPORT
76+
# define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_IMPORT
8977
# endif
9078
# endif
91-
9279
#endif
9380

9481
#ifndef BOOST_PYTHON_DECL
9582
# define BOOST_PYTHON_DECL
9683
#endif
9784

9885
#ifndef BOOST_PYTHON_DECL_FORWARD
99-
# define BOOST_PYTHON_DECL_FORWARD BOOST_PYTHON_DECL
86+
# define BOOST_PYTHON_DECL_FORWARD
10087
#endif
10188

10289
#ifndef BOOST_PYTHON_DECL_EXCEPTION
103-
# define BOOST_PYTHON_DECL_EXCEPTION BOOST_PYTHON_DECL
90+
# define BOOST_PYTHON_DECL_EXCEPTION
10491
#endif
10592

10693
#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))

include/boost/python/detail/exception_handler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace boost { namespace python { namespace detail {
1313

14-
struct BOOST_PYTHON_DECL_FORWARD exception_handler;
14+
struct exception_handler;
1515

1616
typedef function2<bool, exception_handler const&, function0<void> const&> handler_function;
1717

include/boost/python/detail/wrapper_base.hpp

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class override;
1414

1515
namespace detail
1616
{
17-
class BOOST_PYTHON_DECL_FORWARD wrapper_base;
17+
class wrapper_base;
1818

1919
namespace wrapper_base_ // ADL disabler
2020
{

include/boost/python/errors.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
namespace boost { namespace python {
1616

17-
struct BOOST_PYTHON_DECL_EXCEPTION error_already_set
17+
struct BOOST_PYTHON_DECL error_already_set
1818
{
1919
virtual ~error_already_set();
2020
};

include/boost/python/object/instance.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace boost { namespace python
1313
{
14-
struct BOOST_PYTHON_DECL_FORWARD instance_holder;
14+
struct instance_holder;
1515
}} // namespace boost::python
1616

1717
namespace boost { namespace python { namespace objects {

0 commit comments

Comments
 (0)