summaryrefslogtreecommitdiff
path: root/Python/future.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-03-24 16:39:07 +0100
committerVictor Stinner <victor.stinner@haypocalc.com>2011-03-24 16:39:07 +0100
commit670f4ff38f263ce6e63cbc9de7b214cfc35d4c6a (patch)
tree5adaf0a4a0778569e70c636576f8ac65dfb10c75 /Python/future.c
parent3209890fc38bcc25ca4275a81406f44905ed74c7 (diff)
parentf7d7a25e1b644b9a72be9a93aec67b9be4c1f375 (diff)
downloadcpython-670f4ff38f263ce6e63cbc9de7b214cfc35d4c6a.tar.gz
Merge 3.1
Diffstat (limited to 'Python/future.c')
-rw-r--r--Python/future.c8
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))