diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-12-19 06:46:12 +0000 |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-12-19 06:46:12 +0000 |
commit | b46edf35f3dea8c828b45d6ae02d2c716dd1d0ea (patch) | |
tree | 0074b12ae7e8aada22b8753d69f66abde9128412 /Python/errors.c | |
parent | 932ee73188c73bbe63834f69566a4f188fbf43a7 (diff) | |
parent | 619555d77bba05c71d9ef0a1c29ec53a17ebe2ca (diff) | |
download | cpython-git-b46edf35f3dea8c828b45d6ae02d2c716dd1d0ea.tar.gz |
Issue #25677: Merge SyntaxError caret positioning from 3.6
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/errors.c b/Python/errors.c index 35c9e3a727..3785e6981c 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -1138,11 +1138,8 @@ err_programtext(FILE *fp, int lineno) } fclose(fp); if (i == lineno) { - char *p = linebuf; PyObject *res; - while (*p == ' ' || *p == '\t' || *p == '\014') - p++; - res = PyUnicode_FromString(p); + res = PyUnicode_FromString(linebuf); if (res == NULL) PyErr_Clear(); return res; |