[C++-sig] Type conversion problem -- simplified
Randall Hopper
viznut at charter.net
Tue Nov 7 02:37:06 CET 2006
David Abrahams:
|When a Python instance of a wrapped class T is converted to a T*,
|Boost.Python searches through the list of instance_holders (plural, to
|support MI) held by the Python instance for one that contains a T.
|See find_instance_impl in libs/python/src/object/class.cpp
|
|In your case the search is failing where it should succeed. I would
|expect you to have a single instance_holder in the chain that is in
|fact a python::objects::pointer_holder containing a
|ref_ptr<Vec3Array>. The only reasons I can think of for the match to
|fail are:
|
| a. some problem with typeid matching.
| b. the ref_ptr is in fact NULL.
|
|I think you could examine the execution of find_instance_impl in a
|debugger and learn a lot.
Soon as I get this work project squared away, I'll do that. Thanks for the
insight! That's what I needed.
Randall
More information about the Cplusplus-sig
mailing list