diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-19 01:22:07 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-19 01:22:07 +0000 |
commit | aedc66768fa6db278693fa02239a081858493425 (patch) | |
tree | 8a6c2896b813e27ab721c093b80ccb0e7dd88cc9 /Python/compile.c | |
parent | 4f8fc1567ecca1c9ac10931674fda912e5bdc157 (diff) | |
download | cpython-aedc66768fa6db278693fa02239a081858493425.tar.gz |
Recorded merge of revisions 85569-85570 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85569 | victor.stinner | 2010-10-16 15:14:10 +0200 (sam., 16 oct. 2010) | 4 lines
Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expects
filenames encoded to the filesystem encoding with surrogateescape error handler
(to support undecodable bytes), instead of UTF-8 in strict mode.
........
r85570 | victor.stinner | 2010-10-16 15:42:53 +0200 (sam., 16 oct. 2010) | 4 lines
Fix ast_error_finish() and err_input(): filename can be NULL
Fix my previous commit (r85569).
........
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c index a7ac5a0bff..19b2addc10 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -4046,7 +4046,7 @@ makecode(struct compiler *c, struct assembler *a) freevars = dict_keys_inorder(c->u->u_freevars, PyTuple_Size(cellvars)); if (!freevars) goto error; - filename = PyUnicode_FromString(c->c_filename); + filename = PyUnicode_DecodeFSDefault(c->c_filename); if (!filename) goto error; |