[C++-sig] Type conversion problem -- simplified

Roman Yakovenko roman.yakovenko at gmail.com
Sat Nov 4 07:29:03 CET 2006


On 11/4/06, Randall Hopper <viznut at charter.net> wrote:
>      I've been digging into this and can summarize the problem more
> succinctly now (I was barking up the wrong tree before).
>
>      What do I need to do to tell boost::python to dereference a wrapped
> C++ pointer before trying to invoke the C++ class instance's methods?
>
>      I've got a method returning a pointer to a C++ class instance, and
> right now I can't use it as a callable because boost::python treats it like
> a pointer.
>
> Traceback (most recent call last):
>   ...
>   File "osg_to_sgg.py", line 153, in setupGeode
>     v[0].set( 0, 1, 2 )
> Boost.Python.ArgumentError: Python argument types in
>     Vec3Array.__getitem__(Vec3Array, int)
> did not match C++ signature:
>     __getitem__(osg::TemplateArray<osg::Vec3f, (osg::Array::Type)10, 3, 5126>*, int)
>
> Note that the Vec3Array type is identical to the osg::TemplateArray<...>
> type (via typedef), so the key difference is the extra "*" in the last
> line.

I don't think anyone is able to follow you. In my opinion, you'd
better create one
message with clear description of the problem + small test case that reproduces
the problem. Take into account, that most of the people here do not know
what is osg.

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



More information about the Cplusplus-sig mailing list