summaryrefslogtreecommitdiff
path: root/Python/ast.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-06-12 00:28:30 +0000
committerGuido van Rossum <guido@python.org>2007-06-12 00:28:30 +0000
commit05f66a9117bec0081305433b6ff7f5738bd592bc (patch)
treeb36d086f98ba230a4ff64e943e2ed36be5ab1167 /Python/ast.c
parent96c56ecccca9fcc0750e6095ad876d7b674c7bc2 (diff)
downloadcpython-05f66a9117bec0081305433b6ff7f5738bd592bc.tar.gz
Minimal changes to make the "freeze" tool work again.
There are other issues left, but these were basics (e.g. keys().sort()).
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index b34411ba41..b313ef2aa4 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -193,8 +193,11 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename,
if (flags && flags->cf_flags & PyCF_SOURCE_IS_UTF8) {
c.c_encoding = "utf-8";
if (TYPE(n) == encoding_decl) {
+#if 0
ast_error(n, "encoding declaration in Unicode string");
goto error;
+#endif
+ n = CHILD(n, 0);
}
} else if (TYPE(n) == encoding_decl) {
c.c_encoding = STR(n);