projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9aee88
)
only generate tp_clear/traverse functions if type supports GC
author
Stefan Behnel
<scoder@users.berlios.de>
Sat, 12 Jan 2008 10:32:19 +0000
(11:32 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sat, 12 Jan 2008 10:32:19 +0000
(11:32 +0100)
Cython/Compiler/ModuleNode.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ModuleNode.py
b/Cython/Compiler/ModuleNode.py
index 758546daad56c5206cb16823a78c0d98a47ed0c0..5c78abda441ef8c103c57ab8a94f78b1df89c136 100644
(file)
--- a/
Cython/Compiler/ModuleNode.py
+++ b/
Cython/Compiler/ModuleNode.py
@@
-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__"]):