I have several modules which define converters for some trivial types (such as list of ints as std::vector<int>); they are parts of independent modules, but they are sometimes both used in one script, which leads to
RuntimeWarning: to-Python converter for std::vector<int, std::allocator<int> > already registered; second conversion method ignored.
How can I check that converter for some type is already define and skip the second registration?
Note that you need to check also for
((*reg).m_to_python == NULL)otherwise you risk, in some architectures, that the registration does not happen as a default constructor because registration has been called assigning a NULL converter to YourType. In this case query(info) does return the address of the empty registration.