Re: [pygccxml-development] FT - name uniqueness
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-10-12 09:51:00
|
On 10/12/06, Matthias Baas <ba...@ir...> wrote: > 2. Your initial mail was dealing with functions that are inside the same > scope. The above code should be no problem at all as the class name is > incorporated into the wrapper name as well when the wrappers are free > functions. If you have an example where this is not the case, then this > might be a bug. I remember that I post the example for free functions, when Py++ generates to functions with the same signature. May be you already fixed it. I will check. > >> The question may then rather be: who should report the error, Py++ or > >> the compiler? I think it's desirable that Py++ notices this situation > >> and can issue an error, but I don't think it's a good idea to mangle the > >> name so that the code compiles but produces functions that could not be > >> called because they are shadowed by other functions. > > > > Generated code should work. And it is possible to achieve this. > > Without that the user assigns an alias? Yes, Py++ will do it for him. > How will you do that? get_value1 get_value2 ... > If you use the same name to register two different functions that have > the same signature then one of those functions is not accessible in > Python. How should Boost.Python distinguish between the two? Py++ should not generate code like this, unfortunately FT classes does not provide "function signature" functionality. I think this should be fixed. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |