summaryrefslogtreecommitdiffstats
path: root/Python/future.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-09-20 23:02:10 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-09-20 23:02:10 (GMT)
commitd4efd9eb1534eeead7f56c89d1b5e394d8633990 (patch)
tree434f841f14949c0c0e09b9012f1b22842ffae97a /Python/future.c
parent2bc5c0be0141501c23eeb2bc96c33632443186ba (diff)
downloadcpython-d4efd9eb1534eeead7f56c89d1b5e394d8633990.zip
cpython-d4efd9eb1534eeead7f56c89d1b5e394d8633990.tar.gz
cpython-d4efd9eb1534eeead7f56c89d1b5e394d8633990.tar.bz2
add column offset to all syntax errors
Diffstat (limited to 'Python/future.c')
-rw-r--r--Python/future.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Python/future.c b/Python/future.c
index 515dcd9..551edc6 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -44,12 +44,12 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename)
} else if (strcmp(feature, "braces") == 0) {
PyErr_SetString(PyExc_SyntaxError,
"not a chance");
- PyErr_SyntaxLocation(filename, s->lineno);
+ PyErr_SyntaxLocationEx(filename, s->lineno, s->col_offset);
return 0;
} else {
PyErr_Format(PyExc_SyntaxError,
UNDEFINED_FUTURE_FEATURE, feature);
- PyErr_SyntaxLocation(filename, s->lineno);
+ PyErr_SyntaxLocationEx(filename, s->lineno, s->col_offset);
return 0;
}
}
@@ -98,8 +98,7 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, const char *filename)
if (done) {
PyErr_SetString(PyExc_SyntaxError,
ERR_LATE_FUTURE);
- PyErr_SyntaxLocation(filename,
- s->lineno);
+ PyErr_SyntaxLocationEx(filename, s->lineno, s->col_offset);
return 0;
}
if (!future_check_features(ff, s, filename))