Mercurial > cpython-lru_cache-weakref
comparison Python/import.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 | 7f90a671cc1d |
| children | fb39d288664b |
comparison
equal
deleted
inserted
replaced
| 5437:c2dae2b1a123 | 5438:e926c331ebbf |
|---|---|
| 33 | 33 |
| 34 #include "Python.h" | 34 #include "Python.h" |
| 35 | 35 |
| 36 #include "node.h" | 36 #include "node.h" |
| 37 #include "token.h" | 37 #include "token.h" |
| 38 #include "graminit.h" | |
| 39 #include "errcode.h" | 38 #include "errcode.h" |
| 40 #include "marshal.h" | 39 #include "marshal.h" |
| 41 #include "compile.h" | 40 #include "compile.h" |
| 42 #include "eval.h" | 41 #include "eval.h" |
| 43 #include "osdefs.h" | 42 #include "osdefs.h" |
| 44 #include "importdl.h" | 43 #include "importdl.h" |
| 45 #ifdef macintosh | 44 #ifdef macintosh |
| 46 /* 'argument' is a grammar symbol, but also used in some mac header files */ | |
| 47 #undef argument | |
| 48 #include "macglue.h" | 45 #include "macglue.h" |
| 49 #endif | 46 #endif |
| 50 | 47 |
| 51 #ifdef HAVE_UNISTD_H | 48 #ifdef HAVE_UNISTD_H |
| 52 #include <unistd.h> | 49 #include <unistd.h> |
| 315 FILE *fp; | 312 FILE *fp; |
| 316 { | 313 { |
| 317 PyCodeObject *co; | 314 PyCodeObject *co; |
| 318 node *n; | 315 node *n; |
| 319 | 316 |
| 320 n = PyParser_SimpleParseFile(fp, pathname, file_input); | 317 n = PyParser_SimpleParseFile(fp, pathname, Py_file_input); |
| 321 if (n == NULL) | 318 if (n == NULL) |
| 322 return NULL; | 319 return NULL; |
| 323 co = PyNode_Compile(n, pathname); | 320 co = PyNode_Compile(n, pathname); |
| 324 PyNode_Free(n); | 321 PyNode_Free(n); |
| 325 | 322 |
