Skip to content

Commit 9d2903c

Browse files
marvstefanseefeld
authored andcommitted
Fix symbol visibility of init method
This was properly an oversight when switching to the BOOST_SYMBOL_* symbols from Boost.Config in commit 0224f54 (see #1) Since Boost.Config is already doing the differentiation between different platforms and compilers we can simplify this bit and just use BOOST_SYMBOL_EXPORT
1 parent b09d80a commit 9d2903c

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

include/boost/python/module_init.hpp

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,25 +66,9 @@ BOOST_PYTHON_DECL PyObject* init_module(char const* name, void(*)());
6666

6767
# endif
6868

69-
# if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(BOOST_PYTHON_STATIC_MODULE)
70-
71-
# define BOOST_PYTHON_MODULE_INIT(name) \
72-
void BOOST_PP_CAT(init_module_,name)(); \
73-
extern "C" __declspec(dllexport) _BOOST_PYTHON_MODULE_INIT(name)
74-
75-
# elif BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY
76-
77-
# define BOOST_PYTHON_MODULE_INIT(name) \
78-
void BOOST_PP_CAT(init_module_,name)(); \
79-
extern "C" __attribute__ ((__visibility__("default"))) _BOOST_PYTHON_MODULE_INIT(name)
80-
81-
# else
82-
83-
# define BOOST_PYTHON_MODULE_INIT(name) \
84-
void BOOST_PP_CAT(init_module_,name)(); \
85-
extern "C" _BOOST_PYTHON_MODULE_INIT(name)
86-
87-
# endif
69+
# define BOOST_PYTHON_MODULE_INIT(name) \
70+
void BOOST_PP_CAT(init_module_,name)(); \
71+
extern "C" BOOST_SYMBOL_EXPORT _BOOST_PYTHON_MODULE_INIT(name)
8872

8973
# endif
9074

0 commit comments

Comments
 (0)