[C++-sig] same to_python_converter in multiple modules?

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Thu May 30 22:36:47 CEST 2002


--- David Abrahams <david.abrahams at rcn.com> wrote:
> > Common shared library sounds OK, but the global variable is redundant.
> 
> Only if you're using static initializers to register the converter

I do not understand this. Could you please explain?

> > How
> > about enriching the Boost.Python interface:
> >
> >   boost::python::to_python_converter<
> >     boost::array<int, 3>, bpl::boost_array_to_tuple<int, 3> >(
> >       boost::python::do_nothing_if_already_registered());
> >
> > If the alternative as an assert, even that is redundant, but makes it
> clear
> > what will happen and it leaves the door open for future more
> sophisticated
> > mechanisms.
> 
> I'm not sure whether that's enriching or en-crufting the interface. It
> certainly could encourage people to make lots of extension modules with
> duplicate converters, which in turn could make their modules bigger and
> compilation slower. I'd like to think about this some more and/or hear some
> other ideas.

I see your point. I can live with the global variable approach and I will try
it out.

Ralf


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com





More information about the Cplusplus-sig mailing list