Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.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 | 596380a567d2 |
| children | 451c7ccf36b6 |
line wrap: on
line diff
--- a/Python/pythonrun.c Wed May 07 17:42:41 1997 +0000 +++ b/Python/pythonrun.c Wed May 07 17:46:13 1997 +0000 @@ -36,7 +36,6 @@ #include "grammar.h" #include "node.h" #include "parsetok.h" -#include "graminit.h" #undef argument /* Avoid conflict on Mac */ #include "errcode.h" #include "compile.h" @@ -237,7 +236,7 @@ } Py_BEGIN_ALLOW_THREADS n = PyParser_ParseFile(fp, filename, &_PyParser_Grammar, - single_input, ps1, ps2, &err); + Py_single_input, ps1, ps2, &err); Py_END_ALLOW_THREADS Py_XDECREF(v); Py_XDECREF(w); @@ -296,7 +295,7 @@ Py_OptimizeFlag = 1; v = run_pyc_file(fp, filename, d, d); } else { - v = PyRun_File(fp, filename, file_input, d, d); + v = PyRun_File(fp, filename, Py_file_input, d, d); } if (v == NULL) { PyErr_Print(); @@ -316,7 +315,7 @@ if (m == NULL) return -1; d = PyModule_GetDict(m); - v = PyRun_String(command, file_input, d, d); + v = PyRun_String(command, Py_file_input, d, d); if (v == NULL) { PyErr_Print(); return -1;
