Re: [pygccxml-development] Recent Py++ modifications...
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-09-16 05:51:10
|
On 9/15/06, Matthias Baas <ba...@ir...> wrote: > Hi, > > today I noticed that I get a few failures when I run the unit tests for > my Maya bindings. Earlier this week these failures have not been there, > and I actually don't know what's going on here. > > One of the tests contains those two lines: > > fv = MFloatVector(0.6, 0.7, 0.8) > p = MPoint(fv) > > When this code is executed, the second line produces the following error: > > TypeError: No registered converter was able to extract a C++ reference > to type class MVector from this Python object of type MFloatVector > > > The MPoint class is registered like this: > > bp::class_< MPoint >( "MPoint" ) > .def( bp::init< >() ) > .def( bp::init< MVector const & >() ) > .def( bp::init< MFloatVector const & >() ) > ... > > So why does Boost.Python attempt to convert the MFloatVector object into > a MVector object even though there is a constructor that takes an > MFloatVector directly? > > I'm not aware that I have done any changes to Py++ that could influence > this behavior, so is it possible that one of the other recent > modifications to Py++ have caused this? Or does anybody have an idea > where I would have to look for the source of this problem? > As I said, a couple of days ago I haven't had those failures....(?) It is not you. I did small code clean up. Basically I moved some code from creator_t to relevant decl_wrapper classes. May be I broke somthing. Can you create small test case? Do you use latest version from Subversion? -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |