summaryrefslogtreecommitdiffstats
path: root/Python/errors.c
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-12-19 06:46:01 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-12-19 06:46:01 (GMT)
commit619555d77bba05c71d9ef0a1c29ec53a17ebe2ca (patch)
treee1771befdcd8c9fbaa9b67d6830670e99873f226 /Python/errors.c
parent879199ba11947d9765b06806df54566fde75d498 (diff)
parentca3263c50c3b3a3719d2ec3ee7b30b8c669dcb19 (diff)
downloadcpython-619555d77bba05c71d9ef0a1c29ec53a17ebe2ca.zip
cpython-619555d77bba05c71d9ef0a1c29ec53a17ebe2ca.tar.gz
cpython-619555d77bba05c71d9ef0a1c29ec53a17ebe2ca.tar.bz2
Issue #25677: Merge SyntaxError caret positioning from 3.5
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/errors.c b/Python/errors.c
index fd6c42f..6095843 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -1144,11 +1144,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;