Commit 8d153541 authored by Xavier Thompson's avatar Xavier Thompson

Fix attribute decref method in template cypclasses

parent 43467205
......@@ -950,13 +950,17 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
Generate destructor definition for the given cypclass entry.
scope = entry.type.scope
type = entry.type
scope = type.scope
cypclass_attrs = [e for e in scope.var_entries
if e.type.is_cyp_class and not == "this"
and not e.is_type]
if cypclass_attrs:
cypclass_attrs_destructor_name = "%s__cypclass_attrs_destructor__%s" % (Naming.func_prefix,
destructor_with_namespace = "void %s::%s()" % (entry.type.empty_declaration_code(), cypclass_attrs_destructor_name)
destructor_with_namespace = "void %s::%s()" % (type.empty_declaration_code(), cypclass_attrs_destructor_name)
if type.templates:
templates_code = "template <typename %s>" % ", typename ".join( for t in type.templates)
for attr in cypclass_attrs:
# tag: cpp
# mode: compile
cdef cypclass B:
cdef cypclass A[T]:
T t
B b
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment