mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
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:
parent
8813b58ffa
commit
b05a5c7698
7 changed files with 39 additions and 21 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue