summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-06-12 00:28:30 (GMT)
committerGuido van Rossum <guido@python.org>2007-06-12 00:28:30 (GMT)
commit5397039504fa45f7a41b8afe5f0cb485ad4dbcf1 (patch)
treee5b8d338ccca2ffe33bd31d793d31536997d463d /Python
parent0aa35f8709fa5c182254487c609ac4a3ba929ba6 (diff)
downloadcpython-5397039504fa45f7a41b8afe5f0cb485ad4dbcf1.zip
cpython-5397039504fa45f7a41b8afe5f0cb485ad4dbcf1.tar.gz
cpython-5397039504fa45f7a41b8afe5f0cb485ad4dbcf1.tar.bz2
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')
-rw-r--r--Python/ast.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index b34411b..b313ef2 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);