Re: [pygccxml-development] Recent Py++ modifications...
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-09-18 14:10:33
|
On 9/18/06, Matthias Baas <ba...@ir...> wrote: > Roman Yakovenko wrote: > >> 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 > >> [...] > > > > 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? > > I've checked out Py++ from last week and gradually did updates to check > which one was responsible for the failure. The problematic modification > was done in revision 539: > http://svn.sourceforge.net/viewvc/pygccxml?view=rev&revision=539 > > With this modification Py++ generates much more > implicitly_convertible<>() statements in the main function. For example, > I now have the following line which I think is responsible for the failure: > > bp::implicitly_convertible< MFloatVector const &, MVector >(); > > I can't say for sure what is going on inside of Boost.Python and why it > fails, but at least I know that everything has worked before this > modification. > What kind of problems was this modification supposed to fix? I moved the logic whether to create "implicitly_convertible" code to decl_wrapper constructor class, where it should be. > And how do > I get back to the previous behavior? This test http://svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/unittests/casting_tester.py?view=markup&pathrev=539 shows that it should work by default. Can you modify test case in a such way it will fail? I will fix it this evening. Sorry for inconvenience. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |