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

David Abrahams dave at boost-consulting.com
Sun Nov 5 16:23:10 CET 2006


Randall Hopper <viznut at charter.net> writes:

<snip way too much information>

> The puzzling thing about all this is, when I create an osg.Vec3Array inside
> of Python, then I can call methods (such as __getitem__, set, etc.) on that
> Vec3Array from inside Python with no problem.
>
> But if I obtain a reference to a Vec3Array (e.g. returned from that
> Geometry::getVertexArray() API above) which was generated internal to
> OpenSceneGraph), then I get the error message I mentioned previously.

When you pass both kinds of Python Vec3Array object to type(), do you
see the same thing in both cases?

> This makes me thing something isn't being correctly done inside that
> "manage_osg_object" return policy, but I have no clue what that is
> yet.

What is the return type of get_pointer(x) where x is an
osg::ref_ptr<T>?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the Cplusplus-sig mailing list