From: Stefan Behnel Date: Fri, 28 Sep 2012 16:22:15 +0000 (+0200) Subject: avoid unnecessary safety temping of function arguments that are builtins or read... X-Git-Tag: 0.18b1~216 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87ccc971197f6b245718029194f83c34864e8012;p=platform%2Fupstream%2Fpython-cython.git avoid unnecessary safety temping of function arguments that are builtins or read-only variables (e.g. extension types) --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index d73331d..c9417a4 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -1617,7 +1617,9 @@ class NameNode(AtomicExprNode): if ExprNode.nonlocally_immutable(self): return True entry = self.entry - return entry and (entry.is_local or entry.is_arg) and not entry.in_closure + if not entry or entry.in_closure: + return False + return entry.is_local or entry.is_arg or entry.is_builtin or entry.is_readonly def calculate_target_results(self, env): pass