mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Minimal changes to make the "freeze" tool work again.
There are other issues left, but these were basics (e.g. keys().sort()).
This commit is contained in:
parent
0aa35f8709
commit
5397039504
8 changed files with 31 additions and 29 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue