projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71f693f
)
disable return value saving in finally clauses that only change the GIL status
author
Stefan Behnel
<stefan_ml@behnel.de>
Thu, 19 Dec 2013 22:31:51 +0000
(23:31 +0100)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Thu, 19 Dec 2013 22:31:51 +0000
(23:31 +0100)
Cython/Compiler/Nodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Nodes.py
b/Cython/Compiler/Nodes.py
index
44eeddf
..
bb3938b
100644
(file)
--- a/
Cython/Compiler/Nodes.py
+++ b/
Cython/Compiler/Nodes.py
@@
-6463,7
+6463,9
@@
class TryFinallyStatNode(StatNode):
ret_temp = None
if old_label == return_label and not self.finally_clause.is_terminator:
# store away return value for later reuse
- if self.func_return_type:
+ if (self.func_return_type and
+ not self.is_try_finally_in_nogil and
+ not isinstance(self.finally_clause, GILExitNode)):
ret_temp = code.funcstate.allocate_temp(
self.func_return_type, manage_ref=False)
code.putln("%s = %s;" % (ret_temp, Naming.retval_cname))