From: Kurt B. Kaiser Date: Sat, 5 Jan 2008 04:32:22 +0000 (+0000) Subject: Interpreter wasn't displaying the location of a SyntaxError X-Git-Tag: v3.0a3~248 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=43b15097ccdb8cbfaf03a8705730cd5d7ab413fd;p=thirdparty%2FPython%2Fcpython.git Interpreter wasn't displaying the location of a SyntaxError Issue1692 --- diff --git a/Misc/NEWS b/Misc/NEWS index 1dbba8c33840..22c4f869c51a 100644 --- 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 diff --git a/Python/pythonrun.c b/Python/pythonrun.c index f95ea831aa87..faacb447d2ce 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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);