projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c157dc
)
C type casts are 'simple'
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 28 Jan 2011 06:51:36 +0000
(07:51 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 28 Jan 2011 06:51:36 +0000
(07:51 +0100)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index fe5463bf94a7efe7c2fb5f47b261afb83fb6cb98..43c7d3ba3337b727a5b55f3240476d79c43d480e 100755
(executable)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-5388,6
+5388,10
@@
class TypecastNode(ExprNode):
elif self.type.is_complex and self.operand.type.is_complex:
self.operand = self.operand.coerce_to_simple(env)
+ def is_simple(self):
+ # either temp or a C cast => no side effects
+ return True
+
def nogil_check(self, env):
if self.type and self.type.is_pyobject and self.is_temp:
self.gil_error()