]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Declare and use Py_TabcheckFlag here.
authorGuido van Rossum <guido@python.org>
Fri, 10 Apr 1998 19:35:06 +0000 (19:35 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 10 Apr 1998 19:35:06 +0000 (19:35 +0000)
Parser/parsetok.c

index 93df0d69d0e42a78cb8bbf9482dd1567d8ce6fe0..6453b6afe55a133510a7e6add04cd695b11f66e3 100644 (file)
@@ -39,6 +39,8 @@ PERFORMANCE OF THIS SOFTWARE.
 #include "parsetok.h"
 #include "errcode.h"
 
+int Py_TabcheckFlag;
+
 
 /* Forward */
 static node *parsetok Py_PROTO((struct tok_state *, grammar *, int,
@@ -93,6 +95,12 @@ PyParser_ParseFile(fp, filename, g, start, ps1, ps2, err_ret)
                err_ret->error = E_NOMEM;
                return NULL;
        }
+       if (Py_TabcheckFlag || Py_VerboseFlag) {
+               tok->filename = filename;
+               tok->altwarning = (filename != NULL);
+               if (Py_TabcheckFlag >= 2)
+                       tok->alterror++;
+       }
 
 #ifdef macintosh
        {