Re: [pygccxml-development] FT - name uniqueness
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-10-10 11:31:14
|
On 10/10/06, Matthias Baas <ba...@ir...> wrote: > Roman Yakovenko wrote: > > On 10/10/06, Matthias Baas <ba...@ir...> wrote: > >> Roman Yakovenko wrote: > >> > Hi. I would like to propose solution for function name uniqueness > >> problems. > >> > > >> > Problem description: > >> > > >> > void do_smth( int& ); > >> > void do_smth( int&, int& ); > >> > > >> > If user will specify output_t transformer for both functions the > >> > generate code will > >> > not compile, because Py++ will generate 2 functions with the same > >> signature. > >> > > >> > In order to solve this problem, we have to mangle into function name > >> next data: > >> > 1. full name ( namespaces, class names ) > >> > 2. return type information > >> > 3. arguments type information > >> > 4. template arguments type information > >> > >> Assuming that the name has been mangled, how do you invoke those two > >> functions from Python? > > > > I don't change the "alias" of the function, only its wrapper name. > > Python will see the original function name. > > Which of the above functions will be called when I do the following in > Python: > > result = do_smth() > > And how can I invoke the other function? User will provide an aliase for the functions. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |