Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6135df6

Browse files
committed
Declare and use Py_TabcheckFlag here.
1 parent c095200 commit 6135df6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Parser/parsetok.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ PERFORMANCE OF THIS SOFTWARE.
3939
#include "parsetok.h"
4040
#include "errcode.h"
4141

42+
int Py_TabcheckFlag;
43+
4244

4345
/* Forward */
4446
static node *parsetok Py_PROTO((struct tok_state *, grammar *, int,
@@ -93,6 +95,12 @@ PyParser_ParseFile(fp, filename, g, start, ps1, ps2, err_ret)
9395
err_ret->error = E_NOMEM;
9496
return NULL;
9597
}
98+
if (Py_TabcheckFlag || Py_VerboseFlag) {
99+
tok->filename = filename;
100+
tok->altwarning = (filename != NULL);
101+
if (Py_TabcheckFlag >= 2)
102+
tok->alterror++;
103+
}
96104

97105
#ifdef macintosh
98106
{

0 commit comments

Comments
 (0)