Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 5438:e926c331ebbf legacy-trunk
Instead of importing graminit.h whenever one of the three grammar 'root'
symbols is needed, define these in Python.h with a Py_ prefix.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 07 May 1997 17:46:13 +0000 |
| parents | 10267fdc7531 |
| children | af1aea6b968f |
line wrap: on
line diff
--- a/Python/ceval.c Wed May 07 17:42:41 1997 +0000 +++ b/Python/ceval.c Wed May 07 17:46:13 1997 +0000 @@ -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);
