Commit 8953bd8d authored by Stefan Behnel's avatar Stefan Behnel

fix compile time evaluation when StringNode has a Unicode string as value

parent ba350910
......@@ -1532,6 +1532,8 @@ class StringNode(PyConstNode):
return self.result_code
def compile_time_value(self, env):
if self.value.is_unicode:
return self.value
if not IS_PYTHON3:
# use plain str/bytes object in Py2
return self.value.byteencode()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment