diff options
author | Olivier Parcollet <olivier.parcollet@cea.fr> | 2012-11-09 13:40:05 +0100 |
---|---|---|
committer | Olivier Parcollet <olivier.parcollet@cea.fr> | 2012-11-09 13:45:48 +0100 |
commit | cbc9eb15e2f951712eebbd38ee513bed59e7b85d (patch) | |
tree | c1ebf4442b98e54a52b1a2e7cbe1790d73eb4bc1 /Cython/Compiler/ModuleNode.py | |
parent | e2e70dc8399006d76b38b7f24190c4b0d966dbc9 (diff) | |
download | cython-cbc9eb15e2f951712eebbd38ee513bed59e7b85d.tar.gz |
Fix destructor name ...
There appears to be a pb in 9df8c9daf10ff30a8e6506b72406d032f268a17b.
For a template class, A::B::C<T1,T2>
the destructor name was C<T1,T2>
leading to code like
A::B::C<T1,T2>::~C<T1,T2>()
which does not compile on gcc (4.6, 4.7), also it seems to be correct code ...
clang and intel C++ compile it, but not gcc.
I changed the name to generate the code :
A::B::C<T1,T2>::~C()
which compiles on gcc, clang, intel
by further cutting the <...> in the destructor name.
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index d8626d2f9..051a3f128 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -1139,6 +1139,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): # Make sure the namespace delimiter was not in a template arg. while destructor_name.count('<') != destructor_name.count('>'): destructor_name = split_cname.pop() + '::' + destructor_name + destructor_name = destructor_name.split('<',1)[0] code.putln("p->%s.%s::~%s();" % (entry.cname, entry.type.declaration_code(""), destructor_name)) |