1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/python/module_init.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,69 @@
1.4 +// Copyright David Abrahams 2002.
1.5 +// Distributed under the Boost Software License, Version 1.0. (See
1.6 +// accompanying file LICENSE_1_0.txt or copy at
1.7 +// http://www.boost.org/LICENSE_1_0.txt)
1.8 +#ifndef MODULE_INIT_DWA20020722_HPP
1.9 +# define MODULE_INIT_DWA20020722_HPP
1.10 +
1.11 +# include <boost/python/detail/prefix.hpp>
1.12 +
1.13 +# ifndef BOOST_PYTHON_MODULE_INIT
1.14 +
1.15 +namespace boost { namespace python { namespace detail {
1.16 +
1.17 +BOOST_PYTHON_DECL void init_module(char const* name, void(*)());
1.18 +
1.19 +}}}
1.20 +
1.21 +# if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(BOOST_PYTHON_STATIC_MODULE)
1.22 +
1.23 +# define BOOST_PYTHON_MODULE_INIT(name) \
1.24 +void init_module_##name(); \
1.25 +extern "C" __declspec(dllexport) void init##name() \
1.26 +{ \
1.27 + boost::python::detail::init_module( \
1.28 + #name,&init_module_##name); \
1.29 +} \
1.30 +void init_module_##name()
1.31 +
1.32 +# elif defined(_AIX) && !defined(BOOST_PYTHON_STATIC_MODULE)
1.33 +
1.34 +# include <boost/python/detail/aix_init_module.hpp>
1.35 +# define BOOST_PYTHON_MODULE_INIT(name) \
1.36 +void init_module_##name(); \
1.37 +extern "C" \
1.38 +{ \
1.39 + extern PyObject* _PyImport_LoadDynamicModule(char*, char*, FILE *); \
1.40 + void init##name() \
1.41 + { \
1.42 + boost::python::detail::aix_init_module( \
1.43 + _PyImport_LoadDynamicModule, #name, &init_module_##name); \
1.44 + } \
1.45 +} \
1.46 +void init_module_##name()
1.47 +
1.48 +# elif BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY
1.49 +
1.50 +# define BOOST_PYTHON_MODULE_INIT(name) \
1.51 +void init_module_##name(); \
1.52 +extern "C" __attribute__ ((visibility("default"))) void init##name() \
1.53 +{ \
1.54 + boost::python::detail::init_module(#name, &init_module_##name); \
1.55 +} \
1.56 +void init_module_##name()
1.57 +
1.58 +# else
1.59 +
1.60 +# define BOOST_PYTHON_MODULE_INIT(name) \
1.61 +void init_module_##name(); \
1.62 +extern "C" void init##name() \
1.63 +{ \
1.64 + boost::python::detail::init_module(#name, &init_module_##name); \
1.65 +} \
1.66 +void init_module_##name()
1.67 +
1.68 +# endif
1.69 +
1.70 +# endif
1.71 +
1.72 +#endif // MODULE_INIT_DWA20020722_HPP