From: Stefan Behnel Date: Fri, 19 Dec 2008 02:03:50 +0000 (+0100) Subject: allow skipping GIL checks on nodes generated by transforms X-Git-Tag: 0.11-beta~110 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=af0fa8e135366e88124249e574a7ac6823449948;p=cython.git allow skipping GIL checks on nodes generated by transforms --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index c4bcd674..ff02b7f8 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -344,7 +344,7 @@ class ExprNode(Node): error(self.pos, "Address is not constant") def gil_check(self, env): - if env.nogil and self.type.is_pyobject: + if env is not None and env.nogil and self.type.is_pyobject: self.gil_error() # ----------------- Result Allocation -----------------