summaryrefslogtreecommitdiffstats
path: root/Parser/parsetok.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/parsetok.c')
-rw-r--r--Parser/parsetok.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index d877fc9..dbac6e3 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -47,11 +47,8 @@ PyParser_ParseStringFlagsFilename(const char *s, const char *filename,
}
tok->filename = filename ? filename : "<string>";
- if (Py_TabcheckFlag || Py_VerboseFlag) {
- tok->altwarning = (tok->filename != NULL);
- if (Py_TabcheckFlag >= 2)
- tok->alterror++;
- }
+ if (Py_TabcheckFlag >= 3)
+ tok->alterror = 0;
return parsetok(tok, g, start, err_ret, flags);
}
@@ -79,12 +76,8 @@ PyParser_ParseFileFlags(FILE *fp, const char *filename, grammar *g, int start,
return NULL;
}
tok->filename = filename;
- if (Py_TabcheckFlag || Py_VerboseFlag) {
- tok->altwarning = (filename != NULL);
- if (Py_TabcheckFlag >= 2)
- tok->alterror++;
- }
-
+ if (Py_TabcheckFlag >= 3)
+ tok->alterror = 0;
return parsetok(tok, g, start, err_ret, flags);
}