diff options
author | Guido van Rossum <guido@python.org> | 1997-05-07 17:46:13 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-05-07 17:46:13 (GMT) |
commit | b05a5c7698cd8dff3e5c02e513db765ba12281f0 (patch) | |
tree | 86831a79ad6434c88c57ed7cc730cfcd66c3554c /Python/compile.c | |
parent | 8813b58ffa6d83522ad2bbec0437c5c0e52a7ba9 (diff) | |
download | cpython-b05a5c7698cd8dff3e5c02e513db765ba12281f0.zip cpython-b05a5c7698cd8dff3e5c02e513db765ba12281f0.tar.gz cpython-b05a5c7698cd8dff3e5c02e513db765ba12281f0.tar.bz2 |
Instead of importing graminit.h whenever one of the three grammar 'root'
symbols is needed, define these in Python.h with a Py_ prefix.
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index 9d6d395..9525aa0 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -58,6 +58,20 @@ PERFORMANCE OF THIS SOFTWARE. #include <ctype.h> +/* Three symbols from graminit.h are also defined in Python.h, with + Py_ prefixes to their names. Python.h can't include graminit.h + (which defines too many confusing symbols), but we can check here + that they haven't changed (which is very unlikely, but possible). */ +#if Py_single_input != single_input +#error "single_input has changed -- update Py_single_input in Python.h" +#endif +#if Py_file_input != file_input +#error "file_input has changed -- update Py_file_input in Python.h" +#endif +#if Py_eval_input != eval_input +#error "eval_input has changed -- update Py_eval_input in Python.h" +#endif + int Py_OptimizeFlag = 0; #define OP_DELETE 0 |