From b05a5c7698cd8dff3e5c02e513db765ba12281f0 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 7 May 1997 17:46:13 +0000 Subject: Instead of importing graminit.h whenever one of the three grammar 'root' symbols is needed, define these in Python.h with a Py_ prefix. --- Python/compile.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Python/compile.c') 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 +/* 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 -- cgit v1.2.1