Instead of importing graminit.h whenever one of the three grammar 'root'

symbols is needed, define these in Python.h with a Py_ prefix.
This commit is contained in:
Guido van Rossum 1997-05-07 17:46:13 +00:00
parent 8813b58ffa
commit b05a5c7698
7 changed files with 39 additions and 21 deletions

View file

@ -35,7 +35,6 @@ PERFORMANCE OF THIS SOFTWARE.
#include "node.h"
#include "token.h"
#include "graminit.h"
#include "errcode.h"
#include "marshal.h"
#include "compile.h"
@ -43,8 +42,6 @@ PERFORMANCE OF THIS SOFTWARE.
#include "osdefs.h"
#include "importdl.h"
#ifdef macintosh
/* 'argument' is a grammar symbol, but also used in some mac header files */
#undef argument
#include "macglue.h"
#endif
@ -317,7 +314,7 @@ parse_source_module(pathname, fp)
PyCodeObject *co;
node *n;
n = PyParser_SimpleParseFile(fp, pathname, file_input);
n = PyParser_SimpleParseFile(fp, pathname, Py_file_input);
if (n == NULL)
return NULL;
co = PyNode_Compile(n, pathname);