[C++-sig] Boost.Python v2: A few small changes

David Abrahams dave at boost-consulting.com
Fri Oct 4 01:00:26 CEST 2002


From: "Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com>


> --- David Abrahams <dave at boost-consulting.com> wrote:
> > 1. The BOOST_PYTHON_[MEMBER_]FUNCTION_OVERLOADS macros used to expose
> > functions with default arguments will not be available by simply
#including
> > <boost/python/class.hpp> or <boost/python/def.hpp>. Instead they will
be
> > moved to <boost/python/overloads.hpp>
>
> Even though I am working with the latest RC_1_29_0 branch I do not have
to
> include overloads.hpp to use the OVERLOADS macros. Could this be due to
an
> oversight?

No, it's due to the fact that I've been making a few changes on the trunk
which haven't been moved to the release candidate branch yet.
>
> > 2. The module class is officially disappearing, for real. I'm going to
keep
> > module.hpp, but only so I can do:
> >
> >     #include <boost/python/module_init.hpp>
> >     #define BOOST_PYTHON_MODULE BOOST_PYTHON_MODULE_INIT
> >
> > BOOST_PYTHON_MODULE_INIT will continue to be available but deprecated
for
> > Boost 1.29.0, but the "official" macro will be BOOST_PYTHON_MODULE.
>
> So which file do I have to include in the future? Like this?
>
> #include <boost/python/module.hpp>
>
> BOOST_PYTHON_MODULE(my_extension)
> {
>   ...
> }

Good. See any of libs/python/test/*.cpp on the main trunk for examples.

> Will module_init.hpp eventually go away?

In the distant future, yes.


-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave at boost-consulting.com * http://www.boost-consulting.com






More information about the Cplusplus-sig mailing list