Re: [pygccxml-development] FT - open issues
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-10-04 16:06:07
|
On 10/4/06, Matthias Baas <ba...@ir...> wrote: > Roman Yakovenko wrote: > > 2. Name uniqueness\resolution. For example: > > for next C++ code > > > > namespace ft{ > > struct xxx_t{ > > static void get_value( int& x ){ x = 21; } > > private: > > ~xxx_t(){} > > }; > > > > Py++ generates next code > > > > static boost::python::object _py_get_value( ) { > > int x; > > xxx_t::get_value(x); > > return boost::python::object(x); > > } > > > > Obviously if I will introduce similar class with other name, Py++ > > will not generate unique name for get_value. > > You're right. (On the other hand, this other class might reside in its > own source file anyway which reduces chances for a name clash) > I'll see what I can do. I guess it shouldn't be a problem to incorporate > the class name into the function name. > > > 3. transformers index argument from 1 and not from zero. I think we > > need to discuss > > this one more time. I don't agree with this interface. This is > > tooooo confusing. > > Here's a piece of code from the Boost.Python tutorial: > > def("f", f, > return_internal_reference<1, > with_custodian_and_ward<1, 2> >()); > > The numbers 1 and 2 refer to the first and second argument. So I would > find it confusing if Py++ would do it otherwise. > > Besides that, I've reserved the index 0 to represent the return value. Because 0 represents self ( this ). Matthias please consider to change to 0 based. > > 4. Base class for all transformations should be introduced. > > There is one already: function_transformer_t > You may certainly derive from that class if you wish, it's just that you > don't have to (because this class just defines/documents the interface > and doesn't contain any actual code). Where is the code that decides what method should be called and what not? > > 6. Generated code should be different. I mean we should introduce more > > convenience functions in code repository. > > Right, I haven't had the time yet to incorporate all the stuff from that > other thread. But speaking of which, I did try to find that > boost::python::len function you were mentioning but couldn't find it > anywhere. > > - Matthias - > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > pygccxml-development mailing list > pyg...@li... > https://lists.sourceforge.net/lists/listinfo/pygccxml-development > -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |