Commit b357710a authored by Stefan Behnel's avatar Stefan Behnel

only generate tp_clear/traverse functions if type supports GC

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