From: Victor Stinner Date: Sun, 17 Oct 2010 19:03:16 +0000 (+0000) Subject: PyErr_SyntaxLocationEx() uses PyUnicode_DecodeFSDefault(), instead of X-Git-Tag: v3.2a4~469 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15a71cdad2537b9ffcfe7216ea9af61d7888db98;p=thirdparty%2FPython%2Fcpython.git PyErr_SyntaxLocationEx() uses PyUnicode_DecodeFSDefault(), instead of PyUnicode_FromString(), to decode the filename. --- diff --git a/Python/errors.c b/Python/errors.c index a24095dff9f0..e3486b95c510 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -819,7 +819,7 @@ PyErr_SyntaxLocationEx(const char *filename, int lineno, int col_offset) } } if (filename != NULL) { - tmp = PyUnicode_FromString(filename); + tmp = PyUnicode_DecodeFSDefault(filename); if (tmp == NULL) PyErr_Clear(); else {