Commit b357710a authored by Stefan Behnel's avatar Stefan Behnel

only generate tp_clear/traverse functions if type supports GC

parent f9aee885
......@@ -566,6 +566,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
self.generate_exttype_vtable(scope, code)
self.generate_new_function(scope, code)
self.generate_dealloc_function(scope, code)
if scope.needs_gc():
self.generate_traverse_function(scope, code)
self.generate_clear_function(scope, code)
if scope.defines_any(["__getitem__"]):
......
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