From: Stefan Behnel Date: Fri, 28 Jan 2011 06:51:36 +0000 (+0100) Subject: C type casts are 'simple' X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bdb6df8fda2b1811bc7e637ca881864702a248ad;p=cython.git C type casts are 'simple' --- 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()