[C++-sig] registering the same type converter in different modules with Boost.Python
Ralf W. Grosse-Kunstleve
rwgk at yahoo.com
Mon Aug 30 18:40:04 CEST 2010
> We had the same problem where one module registered converters for type A and B
>
> and another module for type B and C. I do not know if Ralf's solution caters
>for
>
> such situations with mixed types.
Yes, you just have to put B in its own module.
> We ended up having a private map (part of the shared library containing our
> converters), so a converter gets only registered in Boost-Python if not
> contained in the map.
Python's import mechanism does this for free if you organize your modules in
a natural way.
Ralf
More information about the Cplusplus-sig
mailing list