Mercurial > cpython-lru_cache-weakref
comparison Python/compile.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 | 5880384d7c71 |
| children | 9c6c07d449df |
comparison
equal
deleted
inserted
replaced
| 5437:c2dae2b1a123 | 5438:e926c331ebbf |
|---|---|
| 55 #include "compile.h" | 55 #include "compile.h" |
| 56 #include "opcode.h" | 56 #include "opcode.h" |
| 57 #include "structmember.h" | 57 #include "structmember.h" |
| 58 | 58 |
| 59 #include <ctype.h> | 59 #include <ctype.h> |
| 60 | |
| 61 /* Three symbols from graminit.h are also defined in Python.h, with | |
| 62 Py_ prefixes to their names. Python.h can't include graminit.h | |
| 63 (which defines too many confusing symbols), but we can check here | |
| 64 that they haven't changed (which is very unlikely, but possible). */ | |
| 65 #if Py_single_input != single_input | |
| 66 #error "single_input has changed -- update Py_single_input in Python.h" | |
| 67 #endif | |
| 68 #if Py_file_input != file_input | |
| 69 #error "file_input has changed -- update Py_file_input in Python.h" | |
| 70 #endif | |
| 71 #if Py_eval_input != eval_input | |
| 72 #error "eval_input has changed -- update Py_eval_input in Python.h" | |
| 73 #endif | |
| 60 | 74 |
| 61 int Py_OptimizeFlag = 0; | 75 int Py_OptimizeFlag = 0; |
| 62 | 76 |
| 63 #define OP_DELETE 0 | 77 #define OP_DELETE 0 |
| 64 #define OP_ASSIGN 1 | 78 #define OP_ASSIGN 1 |
