Commit 15a71cda authored by Victor Stinner's avatar Victor Stinner

PyErr_SyntaxLocationEx() uses PyUnicode_DecodeFSDefault(), instead of

PyUnicode_FromString(), to decode the filename.
parent 5b5d8d58
...@@ -819,7 +819,7 @@ PyErr_SyntaxLocationEx(const char *filename, int lineno, int col_offset) ...@@ -819,7 +819,7 @@ PyErr_SyntaxLocationEx(const char *filename, int lineno, int col_offset)
} }
} }
if (filename != NULL) { if (filename != NULL) {
tmp = PyUnicode_FromString(filename); tmp = PyUnicode_DecodeFSDefault(filename);
if (tmp == NULL) if (tmp == NULL)
PyErr_Clear(); PyErr_Clear();
else { else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment