From bdb6df8fda2b1811bc7e637ca881864702a248ad Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 28 Jan 2011 07:51:36 +0100 Subject: [PATCH] C type casts are 'simple' --- Cython/Compiler/ExprNodes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index fe5463bf..43c7d3ba 100755 --- 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() -- 2.26.2