[Boost-bugs] [Boost C++ Libraries] #5283: Suspect BOOST_PYTHON_DECL missing from init_module()

Subject: [Boost-bugs] [Boost C++ Libraries] #5283: Suspect BOOST_PYTHON_DECL missing from init_module()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-08 18:23:33


#5283: Suspect BOOST_PYTHON_DECL missing from init_module()
----------------------------------------------------+-----------------------
 Reporter: Roland Kay <roland.kay@…> | Owner: dave
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: Python
  Version: Boost 1.46.0 | Severity: Regression
 Keywords: |
----------------------------------------------------+-----------------------
 In the following code, extracted from libs/python/src/module.cpp, I think
 that "BOOST_PYTHON_DECL" has been omitted from the declaration
 of init_module(...). It was present in version 1.43 of Boost and without
 it I get unresolved symbol errors when linking against Boost::Python.

 In summary, I suspect that the third line in the fragment below should
 read:

 {{{
 BOOST_PYTHON_DECL PyObject* init_module(PyModuleDef& moduledef,
 void(*init_function)())
 }}}

 My apologies if this has, in fact, been removed deliberately.


 {{{
 #if PY_VERSION_HEX >= 0x03000000

 PyObject* init_module(PyModuleDef& moduledef, void(*init_function)())
 {
     return init_module_in_scope(
         PyModule_Create(&moduledef),
         init_function);
 }

 #else

 namespace
 {
     PyMethodDef initial_methods[] = { { 0, 0, 0, 0 } };
 }

 BOOST_PYTHON_DECL PyObject* init_module(char const* name,
 void(*init_function)())
 {
     return init_module_in_scope(
         Py_InitModule(const_cast<char*>(name), initial_methods),
         init_function);
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5283>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC