]> granicus.if.org Git - python/commitdiff
PyErr_SyntaxLocationEx() uses PyUnicode_DecodeFSDefault(), instead of
authorVictor Stinner <victor.stinner@haypocalc.com>
Sun, 17 Oct 2010 19:03:16 +0000 (19:03 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sun, 17 Oct 2010 19:03:16 +0000 (19:03 +0000)
PyUnicode_FromString(), to decode the filename.

Python/errors.c

index a24095dff9f062711f2bcaf5dcd8c32e6ebf878b..e3486b95c510161016421e415c7535717e658a5c 100644 (file)
@@ -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 {