Commit ef5d4686 authored by Guido van Rossum's avatar Guido van Rossum

Declare and use Py_TabcheckFlag here.

parent 2f007167
...@@ -39,6 +39,8 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -39,6 +39,8 @@ PERFORMANCE OF THIS SOFTWARE.
#include "parsetok.h" #include "parsetok.h"
#include "errcode.h" #include "errcode.h"
int Py_TabcheckFlag;
/* Forward */ /* Forward */
static node *parsetok Py_PROTO((struct tok_state *, grammar *, int, static node *parsetok Py_PROTO((struct tok_state *, grammar *, int,
...@@ -93,6 +95,12 @@ PyParser_ParseFile(fp, filename, g, start, ps1, ps2, err_ret) ...@@ -93,6 +95,12 @@ PyParser_ParseFile(fp, filename, g, start, ps1, ps2, err_ret)
err_ret->error = E_NOMEM; err_ret->error = E_NOMEM;
return NULL; return NULL;
} }
if (Py_TabcheckFlag || Py_VerboseFlag) {
tok->filename = filename;
tok->altwarning = (filename != NULL);
if (Py_TabcheckFlag >= 2)
tok->alterror++;
}
#ifdef macintosh #ifdef macintosh
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment