fix for boolean optimization
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 9 Oct 2008 22:13:51 +0000 (15:13 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 9 Oct 2008 22:13:51 +0000 (15:13 -0700)
Cython/Compiler/ExprNodes.py

index 939a15a365ae09bd79c9c39cc62a42303c72b045..c5d3a51af6784969f2ff2ec1440ef9f3d41e5022 100644 (file)
@@ -4409,7 +4409,7 @@ class CoerceToPyTypeNode(CoercionNode):
     gil_message = "Converting to Python object"
     
     def coerce_to_boolean(self, env):
-        return self.arg.coerce_to_boolean(env)
+        return self.arg.coerce_to_boolean(env).coerce_to_temp(env)
 
     def analyse_types(self, env):
         # The arg is always already analysed