Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(260744)

Delta Between Two Patch Sets: Include/symtable.h

Issue 11619: On Windows, don't encode filenames in the import machinery
Left Patch Set: Created 8 years, 3 months ago
Right Patch Set: Created 5 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Include/pythonrun.h ('k') | Include/warnings.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #ifndef Py_LIMITED_API 1 #ifndef Py_LIMITED_API
2 #ifndef Py_SYMTABLE_H 2 #ifndef Py_SYMTABLE_H
3 #define Py_SYMTABLE_H 3 #define Py_SYMTABLE_H
4 4
5 #ifdef __cplusplus 5 #ifdef __cplusplus
6 extern "C" { 6 extern "C" {
7 #endif 7 #endif
8 8
9 /* XXX(ncoghlan): This is a weird mix of public names and interpreter internal 9 /* XXX(ncoghlan): This is a weird mix of public names and interpreter internal
10 * names. 10 * names.
(...skipping 12 matching lines...) Expand all
23 PyObject *st_blocks; /* dict: map AST node addresses 23 PyObject *st_blocks; /* dict: map AST node addresses
24 * to symbol table entries */ 24 * to symbol table entries */
25 PyObject *st_stack; /* list: stack of namespace info */ 25 PyObject *st_stack; /* list: stack of namespace info */
26 PyObject *st_global; /* borrowed ref to st_top->ste_symbols */ 26 PyObject *st_global; /* borrowed ref to st_top->ste_symbols */
27 int st_nblocks; /* number of blocks used. kept for 27 int st_nblocks; /* number of blocks used. kept for
28 consistency with the corresponding 28 consistency with the corresponding
29 compiler structure */ 29 compiler structure */
30 PyObject *st_private; /* name of current class or NULL */ 30 PyObject *st_private; /* name of current class or NULL */
31 PyFutureFeatures *st_future; /* module's future features that affect 31 PyFutureFeatures *st_future; /* module's future features that affect
32 the symbol table */ 32 the symbol table */
33 int recursion_depth; /* current recursion depth */
34 int recursion_limit; /* recursion limit */
33 }; 35 };
34 36
35 typedef struct _symtable_entry { 37 typedef struct _symtable_entry {
36 PyObject_HEAD 38 PyObject_HEAD
37 PyObject *ste_id; /* int: key in ste_table->st_blocks */ 39 PyObject *ste_id; /* int: key in ste_table->st_blocks */
38 PyObject *ste_symbols; /* dict: variable names to flags */ 40 PyObject *ste_symbols; /* dict: variable names to flags */
39 PyObject *ste_name; /* string: name of current block */ 41 PyObject *ste_name; /* string: name of current block */
40 PyObject *ste_varnames; /* list of function parameters */ 42 PyObject *ste_varnames; /* list of function parameters */
41 PyObject *ste_children; /* list of child blocks */ 43 PyObject *ste_children; /* list of child blocks */
44 PyObject *ste_directives;/* locations of global and nonlocal statements */
42 _Py_block_ty ste_type; /* module, class, or function */ 45 _Py_block_ty ste_type; /* module, class, or function */
43 int ste_unoptimized; /* false if namespace is optimized */ 46 int ste_unoptimized; /* false if namespace is optimized */
44 int ste_nested; /* true if block is nested */ 47 int ste_nested; /* true if block is nested */
45 unsigned ste_free : 1; /* true if block has free variables */ 48 unsigned ste_free : 1; /* true if block has free variables */
46 unsigned ste_child_free : 1; /* true if a child block has free vars, 49 unsigned ste_child_free : 1; /* true if a child block has free vars,
47 including free refs to globals */ 50 including free refs to globals */
48 unsigned ste_generator : 1; /* true if namespace is a generator */ 51 unsigned ste_generator : 1; /* true if namespace is a generator */
49 unsigned ste_varargs : 1; /* true if block has varargs */ 52 unsigned ste_varargs : 1; /* true if block has varargs */
50 unsigned ste_varkeywords : 1; /* true if block has varkeywords */ 53 unsigned ste_varkeywords : 1; /* true if block has varkeywords */
51 unsigned ste_returns_value : 1; /* true if namespace uses return with 54 unsigned ste_returns_value : 1; /* true if namespace uses return with
52 an argument */ 55 an argument */
56 unsigned ste_needs_class_closure : 1; /* for class scopes, true if a
57 closure over __class__
58 should be created */
53 int ste_lineno; /* first line of block */ 59 int ste_lineno; /* first line of block */
54 int ste_col_offset; /* offset of first line of block */ 60 int ste_col_offset; /* offset of first line of block */
55 int ste_opt_lineno; /* lineno of last exec or import * */ 61 int ste_opt_lineno; /* lineno of last exec or import * */
56 int ste_opt_col_offset; /* offset of last exec or import * */ 62 int ste_opt_col_offset; /* offset of last exec or import * */
57 int ste_tmpname; /* counter for listcomp temp vars */ 63 int ste_tmpname; /* counter for listcomp temp vars */
58 struct symtable *ste_table; 64 struct symtable *ste_table;
59 } PySTEntryObject; 65 } PySTEntryObject;
60 66
61 PyAPI_DATA(PyTypeObject) PySTEntry_Type; 67 PyAPI_DATA(PyTypeObject) PySTEntry_Type;
62 68
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #define OPT_TOPLEVEL 2 /* top-level names, including eval and exec */ 113 #define OPT_TOPLEVEL 2 /* top-level names, including eval and exec */
108 114
109 #define GENERATOR 1 115 #define GENERATOR 1
110 #define GENERATOR_EXPRESSION 2 116 #define GENERATOR_EXPRESSION 2
111 117
112 #ifdef __cplusplus 118 #ifdef __cplusplus
113 } 119 }
114 #endif 120 #endif
115 #endif /* !Py_SYMTABLE_H */ 121 #endif /* !Py_SYMTABLE_H */
116 #endif /* Py_LIMITED_API */ 122 #endif /* Py_LIMITED_API */
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+