[C++-sig] [boost.python] Indexing suite problems with convertable element type

Roman Yakovenko roman.yakovenko at gmail.com
Thu Sep 7 21:59:18 CEST 2006


On 9/7/06, Kirill Lapshin <kir at lapshin.net> wrote:
> > I have a custom date class, that I registered for conversion to Python's
> > datetime.date object. Individual dates convert fine, but when I
> > registered vector<date> with indexing suite, I have a problem that I can
> > insert python date objects into vector, but can't extract them.
>
> Nevermind. A bit more searching around and I found this thread:
> http://thread.gmane.org/gmane.comp.python.c++/9846/focus=9846
>
> So it can be solved by setting NoProxy to true.
>
> Now I just have to figure out how to instruct Py++ to set NoProxy...

mb = module_builder_t( ... )
cls = mb.class_( ... )
cls.indexing_suite.no_proxy = True

Take a look on container_traits:
http://language-binding.net/pygccxml/apidocs/pygccxml.declarations.container_traits.vector_traits-class.html

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list