cleanup and provisionary Py3 fix
authorStefan Behnel <scoder@users.berlios.de>
Thu, 15 May 2008 09:14:12 +0000 (11:14 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 15 May 2008 09:14:12 +0000 (11:14 +0200)
Cython/Compiler/Parsing.py

index 803879eea61ae6b2d15ffab45636c71ebb6c381d..49019fcb9ada764ae97f28f16f78839418c83cc2 100644 (file)
@@ -502,13 +502,8 @@ def p_name(s, name):
                 return ExprNodes.LongNode(pos, value = rep)
             elif isinstance(value, float):
                 return ExprNodes.FloatNode(pos, value = rep)
-            elif isinstance(value, str):
-                sval = Utils.EncodedString(rep[1:-1])
-                sval.encoding = value.encoding
-                return ExprNodes.StringNode(pos, value = sval)
             elif isinstance(value, unicode):
-                sval = Utils.EncodedString(rep[2:-1])
-                return ExprNodes.StringNode(pos, value = sval)
+                return ExprNodes.StringNode(pos, value = value)
             else:
                 error(pos, "Invalid type for compile-time constant: %s"
                     % value.__class__.__name__)