Instead of importing graminit.h whenever one of the three grammar 'root'
symbols is needed, define these in Python.h with a Py_ prefix.
diff --git a/Python/ceval.c b/Python/ceval.c
index 58f0a8c..e23ea72 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -43,7 +43,6 @@
#include "frameobject.h"
#include "eval.h"
#include "opcode.h"
-#include "graminit.h"
#include <ctype.h>
@@ -2637,7 +2636,8 @@
if (PyFile_Check(prog)) {
FILE *fp = PyFile_AsFile(prog);
char *name = PyString_AsString(PyFile_Name(prog));
- if (PyRun_File(fp, name, file_input, globals, locals) == NULL)
+ if (PyRun_File(fp, name, Py_file_input,
+ globals, locals) == NULL)
return -1;
return 0;
}
@@ -2647,7 +2647,7 @@
"embedded '\\0' in exec string");
return -1;
}
- v = PyRun_String(s, file_input, globals, locals);
+ v = PyRun_String(s, Py_file_input, globals, locals);
if (v == NULL)
return -1;
Py_DECREF(v);