keep constant_result when coercing BytesNode
authorStefan Behnel <stefan_ml@behnel.de>
Sun, 12 May 2013 13:17:17 +0000 (15:17 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Sun, 12 May 2013 13:17:17 +0000 (15:17 +0200)
Cython/Compiler/ExprNodes.py

index 860cda8..a2210c8 100755 (executable)
@@ -1157,7 +1157,8 @@ class BytesNode(ConstNode):
             return CharNode(self.pos, value=self.value,
                             constant_result=ord(self.value))
 
-        node = BytesNode(self.pos, value=self.value)
+        node = BytesNode(self.pos, value=self.value,
+                         constant_result=self.constant_result)
         if dst_type.is_pyobject:
             if dst_type in (py_object_type, Builtin.bytes_type):
                 node.type = Builtin.bytes_type