|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63777 - trunk/boost/python
From: rwgk_at_[hidden]
Date: 2010-07-09 10:50:11
Author: rwgk
Date: 2010-07-09 10:50:09 EDT (Fri, 09 Jul 2010)
New Revision: 63777
URL: http://svn.boost.org/trac/boost/changeset/63777
Log:
boost/python/module_init.hpp: patch https://svn.boost.org/trac/boost/ticket/3843
Text files modified:
trunk/boost/python/module_init.hpp | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
Modified: trunk/boost/python/module_init.hpp
==============================================================================
--- trunk/boost/python/module_init.hpp (original)
+++ trunk/boost/python/module_init.hpp 2010-07-09 10:50:09 EDT (Fri, 09 Jul 2010)
@@ -6,6 +6,8 @@
# define MODULE_INIT_DWA20020722_HPP
# include <boost/python/detail/prefix.hpp>
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/stringize.hpp>
# ifndef BOOST_PYTHON_MODULE_INIT
@@ -18,41 +20,41 @@
# if PY_VERSION_HEX >= 0x03000000
# define _BOOST_PYTHON_MODULE_INIT(name) \
-PyObject* PyInit_##name() \
+ PyObject* BOOST_PP_CAT (PyInit_,name)() \
{ \
return boost::python::detail::init_module( \
- #name,&init_module_##name); \
+ BOOST_PP_STRINGIZE(name),&BOOST_PP_CAT(init_module_,name)); \
} \
-void init_module_##name()
+ void BOOST_PP_CAT(init_module_,name)()
# else
# define _BOOST_PYTHON_MODULE_INIT(name) \
-void init##name() \
+ void BOOST_PP_CAT(init,name)() \
{ \
boost::python::detail::init_module( \
- #name,&init_module_##name); \
+ BOOST_PP_STRINGIZE(name),&BOOST_PP_CAT(init_module_,name)); \
} \
-void init_module_##name()
+ void BOOST_PP_CAT(init_module_,name)()
# endif
# if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(BOOST_PYTHON_STATIC_MODULE)
# define BOOST_PYTHON_MODULE_INIT(name) \
-void init_module_##name(); \
+ void BOOST_PP_CAT(init_module_,name)(); \
extern "C" __declspec(dllexport) _BOOST_PYTHON_MODULE_INIT(name)
# elif BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY
# define BOOST_PYTHON_MODULE_INIT(name) \
-void init_module_##name(); \
+ void BOOST_PP_CAT(init_module_,name)(); \
extern "C" __attribute__ ((visibility("default"))) _BOOST_PYTHON_MODULE_INIT(name)
# else
# define BOOST_PYTHON_MODULE_INIT(name) \
-void init_module_##name(); \
+ void BOOST_PP_CAT(init_module_,name)(); \
extern "C" _BOOST_PYTHON_MODULE_INIT(name)
# endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk