Mercurial > cpython-lru_cache-weakref
annotate Include/symtable.h @ 87690:66c1c9f32567 default tip
Add use_weakref option to functools.lru_cache
The use_weakref option makes lru_cache create weak references to the function
arguments when creating the cache key, which prevents them from staying in the
memory forever even after all other references to them are gone.
This is a proof of concept for http://bugs.python.org/issue19859
| author | Radomir Dopieralski <devel@sheep.art.pl> |
|---|---|
| date | Tue, 03 Dec 2013 16:02:48 +0100 |
| parents | df2fdd42b375 |
| children |
| rev | line source |
|---|---|
|
66664
62b61abd02b8
Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents:
64861
diff
changeset
|
1 #ifndef Py_LIMITED_API |
|
16421
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
2 #ifndef Py_SYMTABLE_H |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
3 #define Py_SYMTABLE_H |
|
36739
796d150e45a9
No need to export PySTEntry_New, it is only used in symtable.c
Neal Norwitz <nnorwitz@gmail.com>
parents:
36227
diff
changeset
|
4 |
|
16421
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
5 #ifdef __cplusplus |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
6 extern "C" { |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
7 #endif |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
8 |
|
41464
060c79f6d919
Hide list comp variables and support set comprehensions
Nick Coghlan <ncoghlan@gmail.com>
parents:
40965
diff
changeset
|
9 /* XXX(ncoghlan): This is a weird mix of public names and interpreter internal |
|
060c79f6d919
Hide list comp variables and support set comprehensions
Nick Coghlan <ncoghlan@gmail.com>
parents:
40965
diff
changeset
|
10 * names. |
|
060c79f6d919
Hide list comp variables and support set comprehensions
Nick Coghlan <ncoghlan@gmail.com>
parents:
40965
diff
changeset
|
11 */ |
|
060c79f6d919
Hide list comp variables and support set comprehensions
Nick Coghlan <ncoghlan@gmail.com>
parents:
40965
diff
changeset
|
12 |
|
35742
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
13 typedef enum _block_type { FunctionBlock, ClassBlock, ModuleBlock } |
|
35793
914ec0afa51c
Do not pollute name block_ty, prefix with _Py_
Neal Norwitz <nnorwitz@gmail.com>
parents:
35779
diff
changeset
|
14 _Py_block_ty; |
|
16421
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
15 |
|
16539
a47d93ef103a
Relax the rules for using 'from ... import *' and exec in the presence
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
16428
diff
changeset
|
16 struct _symtable_entry; |
|
16421
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
17 |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
18 struct symtable { |
|
85417
df2fdd42b375
Close #11619: The parser and the import machinery do not encode Unicode
Victor Stinner <victor.stinner@gmail.com>
parents:
83783
diff
changeset
|
19 PyObject *st_filename; /* name of file being compiled, |
|
67151
66d8446a019b
Issue #9738: Document encodings of AST, compiler, parser and PyRun functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
20 decoded from the filesystem encoding */ |
|
61467
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
21 struct _symtable_entry *st_cur; /* current symbol table entry */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
22 struct _symtable_entry *st_top; /* symbol table entry for module */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
23 PyObject *st_blocks; /* dict: map AST node addresses |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
24 * to symbol table entries */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
25 PyObject *st_stack; /* list: stack of namespace info */ |
|
69231
b6fe63c914e4
Issue #9904: fix and clarify some comments + fix indentation in symtable code
Eli Bendersky <eliben@gmail.com>
parents:
68257
diff
changeset
|
26 PyObject *st_global; /* borrowed ref to st_top->ste_symbols */ |
|
b6fe63c914e4
Issue #9904: fix and clarify some comments + fix indentation in symtable code
Eli Bendersky <eliben@gmail.com>
parents:
68257
diff
changeset
|
27 int st_nblocks; /* number of blocks used. kept for |
|
b6fe63c914e4
Issue #9904: fix and clarify some comments + fix indentation in symtable code
Eli Bendersky <eliben@gmail.com>
parents:
68257
diff
changeset
|
28 consistency with the corresponding |
|
b6fe63c914e4
Issue #9904: fix and clarify some comments + fix indentation in symtable code
Eli Bendersky <eliben@gmail.com>
parents:
68257
diff
changeset
|
29 compiler structure */ |
|
61467
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
30 PyObject *st_private; /* name of current class or NULL */ |
|
69231
b6fe63c914e4
Issue #9904: fix and clarify some comments + fix indentation in symtable code
Eli Bendersky <eliben@gmail.com>
parents:
68257
diff
changeset
|
31 PyFutureFeatures *st_future; /* module's future features that affect |
|
b6fe63c914e4
Issue #9904: fix and clarify some comments + fix indentation in symtable code
Eli Bendersky <eliben@gmail.com>
parents:
68257
diff
changeset
|
32 the symbol table */ |
|
80239
ab02cd145f56
Issue #5765: Apply a hard recursion limit in the compiler
Nick Coghlan <ncoghlan@gmail.com>
parents:
69231
diff
changeset
|
33 int recursion_depth; /* current recursion depth */ |
|
ab02cd145f56
Issue #5765: Apply a hard recursion limit in the compiler
Nick Coghlan <ncoghlan@gmail.com>
parents:
69231
diff
changeset
|
34 int recursion_limit; /* recursion limit */ |
|
16421
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
35 }; |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
36 |
|
16539
a47d93ef103a
Relax the rules for using 'from ... import *' and exec in the presence
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
16428
diff
changeset
|
37 typedef struct _symtable_entry { |
|
61467
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
38 PyObject_HEAD |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
39 PyObject *ste_id; /* int: key in ste_table->st_blocks */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
40 PyObject *ste_symbols; /* dict: variable names to flags */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
41 PyObject *ste_name; /* string: name of current block */ |
|
69231
b6fe63c914e4
Issue #9904: fix and clarify some comments + fix indentation in symtable code
Eli Bendersky <eliben@gmail.com>
parents:
68257
diff
changeset
|
42 PyObject *ste_varnames; /* list of function parameters */ |
|
61467
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
43 PyObject *ste_children; /* list of child blocks */ |
|
80147
fbfaef0a9c00
point errors related to nonlocals and globals to the statement declaring them (closes #10189)
Benjamin Peterson <benjamin@python.org>
parents:
69231
diff
changeset
|
44 PyObject *ste_directives;/* locations of global and nonlocal statements */ |
|
61467
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
45 _Py_block_ty ste_type; /* module, class, or function */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
46 int ste_unoptimized; /* false if namespace is optimized */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
47 int ste_nested; /* true if block is nested */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
48 unsigned ste_free : 1; /* true if block has free variables */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
49 unsigned ste_child_free : 1; /* true if a child block has free vars, |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
50 including free refs to globals */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
51 unsigned ste_generator : 1; /* true if namespace is a generator */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
52 unsigned ste_varargs : 1; /* true if block has varargs */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
53 unsigned ste_varkeywords : 1; /* true if block has varkeywords */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
54 unsigned ste_returns_value : 1; /* true if namespace uses return with |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
55 an argument */ |
|
83783
3d858f1eef54
hide the __class__ closure from the class body (#12370)
Benjamin Peterson <benjamin@python.org>
parents:
80240
diff
changeset
|
56 unsigned ste_needs_class_closure : 1; /* for class scopes, true if a |
|
3d858f1eef54
hide the __class__ closure from the class body (#12370)
Benjamin Peterson <benjamin@python.org>
parents:
80240
diff
changeset
|
57 closure over __class__ |
|
3d858f1eef54
hide the __class__ closure from the class body (#12370)
Benjamin Peterson <benjamin@python.org>
parents:
80240
diff
changeset
|
58 should be created */ |
|
61467
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
59 int ste_lineno; /* first line of block */ |
|
64861
861c35cef7aa
add column offset to all syntax errors
Benjamin Peterson <benjamin@python.org>
parents:
63114
diff
changeset
|
60 int ste_col_offset; /* offset of first line of block */ |
|
61467
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
61 int ste_opt_lineno; /* lineno of last exec or import * */ |
|
64861
861c35cef7aa
add column offset to all syntax errors
Benjamin Peterson <benjamin@python.org>
parents:
63114
diff
changeset
|
62 int ste_opt_col_offset; /* offset of last exec or import * */ |
|
61467
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
63 int ste_tmpname; /* counter for listcomp temp vars */ |
|
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
64 struct symtable *ste_table; |
|
35742
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
65 } PySTEntryObject; |
|
16539
a47d93ef103a
Relax the rules for using 'from ... import *' and exec in the presence
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
16428
diff
changeset
|
66 |
|
35742
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
67 PyAPI_DATA(PyTypeObject) PySTEntry_Type; |
|
16539
a47d93ef103a
Relax the rules for using 'from ... import *' and exec in the presence
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
16428
diff
changeset
|
68 |
|
44351
86a2679dca46
#1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT.
Christian Heimes <christian@cheimes.de>
parents:
42334
diff
changeset
|
69 #define PySTEntry_Check(op) (Py_TYPE(op) == &PySTEntry_Type) |
|
16539
a47d93ef103a
Relax the rules for using 'from ... import *' and exec in the presence
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
16428
diff
changeset
|
70 |
|
35742
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
71 PyAPI_FUNC(int) PyST_GetScope(PySTEntryObject *, PyObject *); |
|
16539
a47d93ef103a
Relax the rules for using 'from ... import *' and exec in the presence
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
16428
diff
changeset
|
72 |
|
67151
66d8446a019b
Issue #9738: Document encodings of AST, compiler, parser and PyRun functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
73 PyAPI_FUNC(struct symtable *) PySymtable_Build( |
|
66d8446a019b
Issue #9738: Document encodings of AST, compiler, parser and PyRun functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
74 mod_ty mod, |
|
66d8446a019b
Issue #9738: Document encodings of AST, compiler, parser and PyRun functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
75 const char *filename, /* decoded from the filesystem encoding */ |
|
66d8446a019b
Issue #9738: Document encodings of AST, compiler, parser and PyRun functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
76 PyFutureFeatures *future); |
|
85417
df2fdd42b375
Close #11619: The parser and the import machinery do not encode Unicode
Victor Stinner <victor.stinner@gmail.com>
parents:
83783
diff
changeset
|
77 PyAPI_FUNC(struct symtable *) PySymtable_BuildObject( |
|
df2fdd42b375
Close #11619: The parser and the import machinery do not encode Unicode
Victor Stinner <victor.stinner@gmail.com>
parents:
83783
diff
changeset
|
78 mod_ty mod, |
|
df2fdd42b375
Close #11619: The parser and the import machinery do not encode Unicode
Victor Stinner <victor.stinner@gmail.com>
parents:
83783
diff
changeset
|
79 PyObject *filename, |
|
df2fdd42b375
Close #11619: The parser and the import machinery do not encode Unicode
Victor Stinner <victor.stinner@gmail.com>
parents:
83783
diff
changeset
|
80 PyFutureFeatures *future); |
|
35742
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
81 PyAPI_FUNC(PySTEntryObject *) PySymtable_Lookup(struct symtable *, void *); |
|
16421
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
82 |
|
35742
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
83 PyAPI_FUNC(void) PySymtable_Free(struct symtable *); |
|
16421
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
84 |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
85 /* Flags for def-use information */ |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
86 |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
87 #define DEF_GLOBAL 1 /* global stmt */ |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
88 #define DEF_LOCAL 2 /* assignment in code block */ |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
89 #define DEF_PARAM 2<<1 /* formal parameter */ |
|
40965
30e5cb3a55ac
Provisional implementation of PEP 3104.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
39782
diff
changeset
|
90 #define DEF_NONLOCAL 2<<2 /* nonlocal stmt */ |
|
30e5cb3a55ac
Provisional implementation of PEP 3104.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
39782
diff
changeset
|
91 #define USE 2<<3 /* name is used */ |
|
54918
0704f15b4682
Merged revisions 73376,73393,73398,73400,73404-73405,73409,73419-73421,73432,73457,73460,73485-73486,73488-73489,73501-73502,73513-73514 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
48725
diff
changeset
|
92 #define DEF_FREE 2<<4 /* name used but not defined in nested block */ |
|
0704f15b4682
Merged revisions 73376,73393,73398,73400,73404-73405,73409,73419-73421,73432,73457,73460,73485-73486,73488-73489,73501-73502,73513-73514 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
48725
diff
changeset
|
93 #define DEF_FREE_CLASS 2<<5 /* free variable from class's method */ |
|
0704f15b4682
Merged revisions 73376,73393,73398,73400,73404-73405,73409,73419-73421,73432,73457,73460,73485-73486,73488-73489,73501-73502,73513-73514 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
48725
diff
changeset
|
94 #define DEF_IMPORT 2<<6 /* assignment occurred via import */ |
|
16421
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
95 |
| 16866 | 96 #define DEF_BOUND (DEF_LOCAL | DEF_PARAM | DEF_IMPORT) |
| 97 | |
|
35742
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
98 /* GLOBAL_EXPLICIT and GLOBAL_IMPLICIT are used internally by the symbol |
|
61467
f197407bdba2
Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents:
48725
diff
changeset
|
99 table. GLOBAL is returned from PyST_GetScope() for either of them. |
|
40965
30e5cb3a55ac
Provisional implementation of PEP 3104.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
39782
diff
changeset
|
100 It is stored in ste_symbols at bits 12-15. |
|
35742
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
101 */ |
|
41464
060c79f6d919
Hide list comp variables and support set comprehensions
Nick Coghlan <ncoghlan@gmail.com>
parents:
40965
diff
changeset
|
102 #define SCOPE_OFFSET 11 |
|
40965
30e5cb3a55ac
Provisional implementation of PEP 3104.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
39782
diff
changeset
|
103 #define SCOPE_MASK (DEF_GLOBAL | DEF_LOCAL | DEF_PARAM | DEF_NONLOCAL) |
|
16421
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
104 |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
105 #define LOCAL 1 |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
106 #define GLOBAL_EXPLICIT 2 |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
107 #define GLOBAL_IMPLICIT 3 |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
108 #define FREE 4 |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
109 #define CELL 5 |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
110 |
|
39782
c94f37054f19
Patch #1550800: make exec a function.
Georg Brandl <georg@python.org>
parents:
38588
diff
changeset
|
111 /* The following two names are used for the ste_unoptimized bit field */ |
|
16781
5a1230de436a
Preliminary support for future nested scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
16539
diff
changeset
|
112 #define OPT_IMPORT_STAR 1 |
|
39782
c94f37054f19
Patch #1550800: make exec a function.
Georg Brandl <georg@python.org>
parents:
38588
diff
changeset
|
113 #define OPT_TOPLEVEL 2 /* top-level names, including eval and exec */ |
|
35742
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
114 |
|
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
115 #define GENERATOR 1 |
|
1c4d192f1568
Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
32121
diff
changeset
|
116 #define GENERATOR_EXPRESSION 2 |
|
16781
5a1230de436a
Preliminary support for future nested scopes
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
16539
diff
changeset
|
117 |
|
16421
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
118 #ifdef __cplusplus |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
119 } |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
120 #endif |
|
aa844711463a
Move a bunch of definitions that were internal to compile.c to
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
diff
changeset
|
121 #endif /* !Py_SYMTABLE_H */ |
|
66664
62b61abd02b8
Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents:
64861
diff
changeset
|
122 #endif /* Py_LIMITED_API */ |
