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

Switch^Cisibility support to BOOST_SYMBOL_EXPORT. Refs #2114

This commit is contained in:
Jürgen Hunold
2014-01-04 11:07:06 +01:00
committed by Stefan Seefeld
parent d14b8cf411
commit 0224f54ae0
5 changed files with 13 additions and 26 deletions

View File

@@ -64,31 +64,18 @@
#endif
#if defined(BOOST_PYTHON_DYNAMIC_LIB)
# if !defined(_WIN32) && !defined(__CYGWIN__) \
&& !defined(BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY) \
&& BOOST_WORKAROUND(__GNUC__, >= 3) && (__GNUC_MINOR__ >=5 || __GNUC__ > 3)
# define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 1
# endif
# if BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY
# if defined(BOOST_SYMBOL_EXPORT)
# if defined(BOOST_PYTHON_SOURCE)
# define BOOST_PYTHON_DECL __attribute__ ((__visibility__("default")))
# define BOOST_PYTHON_DECL BOOST_SYMBOL_EXPORT
# define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_EXPORT
# define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_EXPORT
# define BOOST_PYTHON_BUILD_DLL
# else
# define BOOST_PYTHON_DECL
# endif
# define BOOST_PYTHON_DECL_FORWARD
# define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((__visibility__("default")))
# elif (defined(_WIN32) || defined(__CYGWIN__))
# if defined(BOOST_PYTHON_SOURCE)
# define BOOST_PYTHON_DECL __declspec(dllexport)
# define BOOST_PYTHON_BUILD_DLL
# else
# define BOOST_PYTHON_DECL __declspec(dllimport)
# define BOOST_PYTHON_DECL BOOST_SYMBOL_IMPORT
# define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_IMPORT
# define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_IMPORT
# endif
# endif
#endif
#ifndef BOOST_PYTHON_DECL
@@ -96,11 +83,11 @@
#endif
#ifndef BOOST_PYTHON_DECL_FORWARD
# define BOOST_PYTHON_DECL_FORWARD BOOST_PYTHON_DECL
# define BOOST_PYTHON_DECL_FORWARD
#endif
#ifndef BOOST_PYTHON_DECL_EXCEPTION
# define BOOST_PYTHON_DECL_EXCEPTION BOOST_PYTHON_DECL
# define BOOST_PYTHON_DECL_EXCEPTION
#endif
#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))

View File

@@ -11,7 +11,7 @@
namespace boost { namespace python { namespace detail {
struct BOOST_PYTHON_DECL_FORWARD exception_handler;
struct exception_handler;
typedef function2<bool, exception_handler const&, function0<void> const&> handler_function;

2
include/boost/python/detail/wrapper_base.hpp Executable file → Normal file
View File

@@ -14,7 +14,7 @@ class override;
namespace detail
{
class BOOST_PYTHON_DECL_FORWARD wrapper_base;
class wrapper_base;
namespace wrapper_base_ // ADL disabler
{

View File

@@ -14,7 +14,7 @@
namespace boost { namespace python {
struct BOOST_PYTHON_DECL_EXCEPTION error_already_set
struct BOOST_PYTHON_DECL error_already_set
{
virtual ~error_already_set();
};

View File

@@ -11,7 +11,7 @@
namespace boost { namespace python
{
struct BOOST_PYTHON_DECL_FORWARD instance_holder;
struct instance_holder;
}} // namespace boost::python
namespace boost { namespace python { namespace objects {