From d832914e8569f9bddb2cbb059cd81fc4d3a7a333 Mon Sep 17 00:00:00 2001 From: Nikita Nemkin Date: Tue, 19 Mar 2013 18:57:57 +0600 Subject: [PATCH] Correctly handle compile-time strings appearing in Python context. --- Cython/Compiler/Parsing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 0f44050..ea1731b 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -708,9 +708,9 @@ def wrap_compile_time_constant(pos, value): elif isinstance(value, float): return ExprNodes.FloatNode(pos, value=rep) elif isinstance(value, _unicode): - return ExprNodes.UnicodeNode(pos, value=value) + return ExprNodes.UnicodeNode(pos, value=EncodedString(value)) elif isinstance(value, _bytes): - return ExprNodes.BytesNode(pos, value=value) + return ExprNodes.BytesNode(pos, value=BytesLiteral(value)) elif isinstance(value, tuple): args = [wrap_compile_time_constant(pos, arg) for arg in value] -- 2.7.4