diff options
author | Brian Curtin <brian@python.org> | 2011-04-29 16:11:30 -0500 |
---|---|---|
committer | Brian Curtin <brian@python.org> | 2011-04-29 16:11:30 -0500 |
commit | 25cfac3cac53b7a7bd968a08ef69e016ebc685b9 (patch) | |
tree | 77977fe0ae956219c1eac08bcdf3d2ac8701cd55 /Python/future.c | |
parent | f867c0ba400d15dd934a980de287b8c6daa662a5 (diff) | |
parent | e1a1eb575eed13acdfc5407ee576e0032e01482d (diff) | |
download | cpython-25cfac3cac53b7a7bd968a08ef69e016ebc685b9.tar.gz |
merge
Diffstat (limited to 'Python/future.c')
-rw-r--r-- | Python/future.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Python/future.c b/Python/future.c index 515dcd9dc6..d6b653f315 100644 --- a/Python/future.c +++ b/Python/future.c @@ -4,7 +4,6 @@ #include "token.h" #include "graminit.h" #include "code.h" -#include "compile.h" #include "symtable.h" #define UNDEFINED_FUTURE_FEATURE "future feature %.100s is not defined" @@ -44,12 +43,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 +97,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)) |