From: Nikita Nemkin Date: Tue, 19 Mar 2013 12:57:57 +0000 (+0600) Subject: Correctly handle compile-time strings appearing in Python context. X-Git-Tag: 0.19b1~24^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d832914e8569f9bddb2cbb059cd81fc4d3a7a333;p=platform%2Fupstream%2Fpython-cython.git Correctly handle compile-time strings appearing in Python context. --- 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]