summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-12-21 18:32:40 (GMT)
committerGuido van Rossum <guido@python.org>1998-12-21 18:32:40 (GMT)
commit89ce4544988bcfd3535c11f1f8d1d55aea69a81f (patch)
tree21d3ac79bb4e5d7ae5afbe7dd4ac475b2c1c63d6 /Parser
parentb55f9ff68c561478af056aa13d89f446ff4193f7 (diff)
downloadcpython-89ce4544988bcfd3535c11f1f8d1d55aea69a81f.zip
cpython-89ce4544988bcfd3535c11f1f8d1d55aea69a81f.tar.gz
cpython-89ce4544988bcfd3535c11f1f8d1d55aea69a81f.tar.bz2
Make sure that -t and -tt also work on strings passed to compile().
Diffstat (limited to 'Parser')
-rw-r--r--Parser/parsetok.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index 6453b6a..5b0d990 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -68,6 +68,13 @@ PyParser_ParseString(s, g, start, err_ret)
return NULL;
}
+ if (Py_TabcheckFlag || Py_VerboseFlag) {
+ tok->filename = "<string>";
+ tok->altwarning = (tok->filename != NULL);
+ if (Py_TabcheckFlag >= 2)
+ tok->alterror++;
+ }
+
return parsetok(tok, g, start, err_ret);
}