summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ModuleNode.py
diff options
context:
space:
mode:
authorOlivier Parcollet <olivier.parcollet@cea.fr>2012-11-09 13:40:05 +0100
committerRobert Bradshaw <robertwb@math.washington.edu>2012-11-09 10:49:57 -0800
commitcc6a2207f3a871f9b977952a6dba804cfa582fd9 (patch)
tree5b864880245a8c21de082ed80a0849b9db1a1eb2 /Cython/Compiler/ModuleNode.py
parent2d077f962c875517351903379ecd34f88e26201c (diff)
downloadcython-cc6a2207f3a871f9b977952a6dba804cfa582fd9.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.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index c8bf9527e..5bce33198 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))