On Thu, Jun 24, 2010 at 1:49 PM, Benoit Leveau
<ben...@mo...> wrote:
> Benoit Leveau wrote:
I am really sorry for late response - few issues in production :-(
>> Here is an extract of my class (complete test case attached)
>> --
>> class Foo
>> {
>> ...
>> protected:
>> template< typename T > void method_( std::vector< T > &vec );
>> };
py++ contains work around for the issue you have.
You will have to change the function name:
mb = module_builder_t( ... )
f = mb.mem_fun( ... )
f.name = f.demangled_name
mb.run_query_optimizer()
Description. GCCXML, when reports found function declarations, reports
name only. py++ (via pygccxml) uses "mangled" function name and tries
to extract the relevant information. The approach is an error prone
and I don't have enough use case, to make it to be the "default"
behavior.
After you change the function name, you will have to re-initialize the
"query optimizer". Query optimizer allows py++ to find declaration
very quickly. A declaration name is one of the important keys in its
data structure.
> Additional note:
> I'm excluding the protected/private functions from the binding so this bug shouldn't bother me,
> but because of the other bug I reported (caused by the readme() call), these protected functions are not excluded as they should,
> so the compilation error appears.
:-(((
May I suggest you something? Can you create a single file, which
includes all other files and pass it to py++?
The proposed mode has few advantages, over the current one:
* much faster
* doesn't contain known bugs :-)
Can you try to switch to it?
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|