summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-06-04 13:01:30 (GMT)
committerGeorg Brandl <georg@python.org>2008-06-04 13:01:30 (GMT)
commita26f8ca668d09eff8ab03ef3d1cddb9bfbc6d124 (patch)
tree4b3704507702b98e0ce4107403a72093a5d6b9fc /Parser
parentf954c4b9fb8529cc13a2e24c58137c66ac836b28 (diff)
downloadcpython-a26f8ca668d09eff8ab03ef3d1cddb9bfbc6d124.zip
cpython-a26f8ca668d09eff8ab03ef3d1cddb9bfbc6d124.tar.gz
cpython-a26f8ca668d09eff8ab03ef3d1cddb9bfbc6d124.tar.bz2
Revert r63934 -- it was mixing two patches.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/parsetok.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index d8ff6ee..c6be8f9 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -10,6 +10,8 @@
#include "errcode.h"
#include "graminit.h"
+int Py_TabcheckFlag;
+
/* Forward */
static node *parsetok(struct tok_state *, grammar *, int, perrdetail *, int *);
@@ -55,6 +57,9 @@ PyParser_ParseStringFlagsFilenameEx(const char *s, const char *filename,
}
tok->filename = filename ? filename : "<string>";
+ if (Py_TabcheckFlag >= 3)
+ tok->alterror = 0;
+
return parsetok(tok, g, start, err_ret, flags);
}
@@ -92,6 +97,9 @@ PyParser_ParseFileFlagsEx(FILE *fp, const char *filename,
return NULL;
}
tok->filename = filename;
+ if (Py_TabcheckFlag >= 3)
+ tok->alterror = 0;
+
return parsetok(tok, g, start, err_ret, flags);
}