diff options
| author | Guido van Rossum <guido@python.org> | 1997-05-07 17:46:13 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1997-05-07 17:46:13 +0000 |
| commit | 98e84593f90bb1cb257b3d0c8a34729364338215 (patch) | |
| tree | df59b42a6464d2c1b4d5fc768a4d7c11b5ade6d9 /Python/compile.c | |
| parent | 021aea5f0010ad14ce896d1a3d507b56ca3c5694 (diff) | |
| download | cpython-98e84593f90bb1cb257b3d0c8a34729364338215.tar.gz | |
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 9d6d395e00..9525aa0932 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 |
