]> granicus.if.org Git - python/commitdiff
Interpreter wasn't displaying the location of a SyntaxError
authorKurt B. Kaiser <kbk@shore.net>
Sat, 5 Jan 2008 04:32:22 +0000 (04:32 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Sat, 5 Jan 2008 04:32:22 +0000 (04:32 +0000)
Issue1692

Misc/NEWS
Python/pythonrun.c

index 1dbba8c338403715b26465004bc4b5c2bd3a5c60..22c4f869c51ad8d28a86f6964589bb7a44c687f6 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 3.0a3?
 Core and Builtins
 -----------------
 
+- Issue #1692: Interpreter was not displaying location of SyntaxError
+
 - Improve some exception messages when Windows fails to load an extension
   module. Now we get for example '%1 is not a valid Win32 application' instead
   of 'error code 193'.  Also use Unicode strings to deal with non-English
index f95ea831aa877ad3e54944c34eaa569f6d964cb2..faacb447d2ce1890cff043b15c1dd60141a6363d 100644 (file)
@@ -1103,7 +1103,7 @@ parse_syntax_error(PyObject *err, PyObject **message, const char **filename,
                goto finally;
        if (v == Py_None)
                *filename = NULL;
-       else if (! (*filename = PyString_AsString(v)))
+       else if (! (*filename = PyUnicode_AsString(v)))
                goto finally;
 
        Py_DECREF(v);