projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c55c30
)
fix usage of new manage_ref keyword for temp handles
author
Stefan Behnel
<scoder@users.berlios.de>
Thu, 27 Nov 2008 13:28:53 +0000
(14:28 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Thu, 27 Nov 2008 13:28:53 +0000
(14:28 +0100)
Cython/Compiler/UtilNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/UtilNodes.py
b/Cython/Compiler/UtilNodes.py
index 7fcf6fda27745fc4633bc9384a3e23bd5b91a090..58592117726454683a89e23f8b4cbe1b248ab040 100644
(file)
--- a/
Cython/Compiler/UtilNodes.py
+++ b/
Cython/Compiler/UtilNodes.py
@@
-79,7
+79,9
@@
class TempsBlockNode(Node):
def generate_execution_code(self, code):
for handle in self.temps:
- handle.temp = code.funcstate.allocate_temp(handle.type, manage_ref=True)
+ managed = handle.needs_cleanup or not handle.type.is_pyobject
+ handle.temp = code.funcstate.allocate_temp(
+ handle.type, manage_ref=managed)
self.body.generate_execution_code(code)
for handle in self.temps:
if handle.needs_cleanup: