[C++-sig] class registration - bug or feature?
Roman Yakovenko
roman.yakovenko at gmail.com
Fri Jul 7 08:04:16 CEST 2006
On 7/7/06, David Abrahams <dave at boost-consulting.com> wrote:
> "Roman Yakovenko" <roman.yakovenko at gmail.com> writes:
>
> > Hi. Please take a look on next code
> >
> > struct X{
> > void do_smth();
> > };
> >
> > class_<X>("X");
> >
> > class_<X>("X")
> > .def( "do_smth", &X::do_smth );
> >
> > Boost.Python reports a warning while registering class X second time:
> > "to-Python converter for struct X already registered; second
> > conversion method ignored."
> > But, indeed Boost.Python continues to register the class - I mean,
> > that Boost.Python adds functions to the already registered class.
>
> That's not the same as registering it again.
>
> > My question: is this a bug or it is a desired behaviour?
>
> Desired. Or at least, expected. There's been nothing better
> proposed.
I just wanted to know whether I can write program that uses this feature or not.
Thank you!
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
More information about the Cplusplus-sig
mailing list