allow skipping GIL checks on nodes generated by transforms
authorStefan Behnel <scoder@users.berlios.de>
Fri, 19 Dec 2008 02:03:50 +0000 (03:03 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 19 Dec 2008 02:03:50 +0000 (03:03 +0100)
Cython/Compiler/ExprNodes.py

index c4bcd674185ded0ffb5591e09a4c30033aea79c7..ff02b7f888937e1edc7ffc060974474c14cd8453 100644 (file)
@@ -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 -----------------