mirror of https://github.com/python/cpython
PyErr_SyntaxLocationEx() uses PyUnicode_DecodeFSDefault(), instead of
PyUnicode_FromString(), to decode the filename.
This commit is contained in:
parent
5b5d8d58c7
commit
15a71cdad2
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue