[pygccxml-development] FT - name uniqueness
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-10-09 21:23:36
|
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 Fortunately every function in pygccxml already has property that contains all this information: mangled . I think we can reuse it for this purpose. Actually we will have to apply base64( http://docs.python.org/lib/module-base64.html ) encoding in order to get valid C++ identifier. Comments? -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |