Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/python3....
File: symtable.h
#ifndef Py_LIMITED_API
[0] Fix | Delete
#ifndef Py_SYMTABLE_H
[1] Fix | Delete
#define Py_SYMTABLE_H
[2] Fix | Delete
[3] Fix | Delete
#ifdef __cplusplus
[4] Fix | Delete
extern "C" {
[5] Fix | Delete
#endif
[6] Fix | Delete
[7] Fix | Delete
/* XXX(ncoghlan): This is a weird mix of public names and interpreter internal
[8] Fix | Delete
* names.
[9] Fix | Delete
*/
[10] Fix | Delete
[11] Fix | Delete
typedef enum _block_type { FunctionBlock, ClassBlock, ModuleBlock }
[12] Fix | Delete
_Py_block_ty;
[13] Fix | Delete
[14] Fix | Delete
struct _symtable_entry;
[15] Fix | Delete
[16] Fix | Delete
struct symtable {
[17] Fix | Delete
PyObject *st_filename; /* name of file being compiled,
[18] Fix | Delete
decoded from the filesystem encoding */
[19] Fix | Delete
struct _symtable_entry *st_cur; /* current symbol table entry */
[20] Fix | Delete
struct _symtable_entry *st_top; /* symbol table entry for module */
[21] Fix | Delete
PyObject *st_blocks; /* dict: map AST node addresses
[22] Fix | Delete
* to symbol table entries */
[23] Fix | Delete
PyObject *st_stack; /* list: stack of namespace info */
[24] Fix | Delete
PyObject *st_global; /* borrowed ref to st_top->ste_symbols */
[25] Fix | Delete
int st_nblocks; /* number of blocks used. kept for
[26] Fix | Delete
consistency with the corresponding
[27] Fix | Delete
compiler structure */
[28] Fix | Delete
PyObject *st_private; /* name of current class or NULL */
[29] Fix | Delete
PyFutureFeatures *st_future; /* module's future features that affect
[30] Fix | Delete
the symbol table */
[31] Fix | Delete
int recursion_depth; /* current recursion depth */
[32] Fix | Delete
int recursion_limit; /* recursion limit */
[33] Fix | Delete
};
[34] Fix | Delete
[35] Fix | Delete
typedef struct _symtable_entry {
[36] Fix | Delete
PyObject_HEAD
[37] Fix | Delete
PyObject *ste_id; /* int: key in ste_table->st_blocks */
[38] Fix | Delete
PyObject *ste_symbols; /* dict: variable names to flags */
[39] Fix | Delete
PyObject *ste_name; /* string: name of current block */
[40] Fix | Delete
PyObject *ste_varnames; /* list of function parameters */
[41] Fix | Delete
PyObject *ste_children; /* list of child blocks */
[42] Fix | Delete
PyObject *ste_directives;/* locations of global and nonlocal statements */
[43] Fix | Delete
_Py_block_ty ste_type; /* module, class, or function */
[44] Fix | Delete
int ste_nested; /* true if block is nested */
[45] Fix | Delete
unsigned ste_free : 1; /* true if block has free variables */
[46] Fix | Delete
unsigned ste_child_free : 1; /* true if a child block has free vars,
[47] Fix | Delete
including free refs to globals */
[48] Fix | Delete
unsigned ste_generator : 1; /* true if namespace is a generator */
[49] Fix | Delete
unsigned ste_coroutine : 1; /* true if namespace is a coroutine */
[50] Fix | Delete
unsigned ste_varargs : 1; /* true if block has varargs */
[51] Fix | Delete
unsigned ste_varkeywords : 1; /* true if block has varkeywords */
[52] Fix | Delete
unsigned ste_returns_value : 1; /* true if namespace uses return with
[53] Fix | Delete
an argument */
[54] Fix | Delete
unsigned ste_needs_class_closure : 1; /* for class scopes, true if a
[55] Fix | Delete
closure over __class__
[56] Fix | Delete
should be created */
[57] Fix | Delete
int ste_lineno; /* first line of block */
[58] Fix | Delete
int ste_col_offset; /* offset of first line of block */
[59] Fix | Delete
int ste_opt_lineno; /* lineno of last exec or import * */
[60] Fix | Delete
int ste_opt_col_offset; /* offset of last exec or import * */
[61] Fix | Delete
int ste_tmpname; /* counter for listcomp temp vars */
[62] Fix | Delete
struct symtable *ste_table;
[63] Fix | Delete
} PySTEntryObject;
[64] Fix | Delete
[65] Fix | Delete
PyAPI_DATA(PyTypeObject) PySTEntry_Type;
[66] Fix | Delete
[67] Fix | Delete
#define PySTEntry_Check(op) (Py_TYPE(op) == &PySTEntry_Type)
[68] Fix | Delete
[69] Fix | Delete
PyAPI_FUNC(int) PyST_GetScope(PySTEntryObject *, PyObject *);
[70] Fix | Delete
[71] Fix | Delete
PyAPI_FUNC(struct symtable *) PySymtable_Build(
[72] Fix | Delete
mod_ty mod,
[73] Fix | Delete
const char *filename, /* decoded from the filesystem encoding */
[74] Fix | Delete
PyFutureFeatures *future);
[75] Fix | Delete
PyAPI_FUNC(struct symtable *) PySymtable_BuildObject(
[76] Fix | Delete
mod_ty mod,
[77] Fix | Delete
PyObject *filename,
[78] Fix | Delete
PyFutureFeatures *future);
[79] Fix | Delete
PyAPI_FUNC(PySTEntryObject *) PySymtable_Lookup(struct symtable *, void *);
[80] Fix | Delete
[81] Fix | Delete
PyAPI_FUNC(void) PySymtable_Free(struct symtable *);
[82] Fix | Delete
[83] Fix | Delete
/* Flags for def-use information */
[84] Fix | Delete
[85] Fix | Delete
#define DEF_GLOBAL 1 /* global stmt */
[86] Fix | Delete
#define DEF_LOCAL 2 /* assignment in code block */
[87] Fix | Delete
#define DEF_PARAM 2<<1 /* formal parameter */
[88] Fix | Delete
#define DEF_NONLOCAL 2<<2 /* nonlocal stmt */
[89] Fix | Delete
#define USE 2<<3 /* name is used */
[90] Fix | Delete
#define DEF_FREE 2<<4 /* name used but not defined in nested block */
[91] Fix | Delete
#define DEF_FREE_CLASS 2<<5 /* free variable from class's method */
[92] Fix | Delete
#define DEF_IMPORT 2<<6 /* assignment occurred via import */
[93] Fix | Delete
#define DEF_ANNOT 2<<7 /* this name is annotated */
[94] Fix | Delete
[95] Fix | Delete
#define DEF_BOUND (DEF_LOCAL | DEF_PARAM | DEF_IMPORT)
[96] Fix | Delete
[97] Fix | Delete
/* GLOBAL_EXPLICIT and GLOBAL_IMPLICIT are used internally by the symbol
[98] Fix | Delete
table. GLOBAL is returned from PyST_GetScope() for either of them.
[99] Fix | Delete
It is stored in ste_symbols at bits 12-15.
[100] Fix | Delete
*/
[101] Fix | Delete
#define SCOPE_OFFSET 11
[102] Fix | Delete
#define SCOPE_MASK (DEF_GLOBAL | DEF_LOCAL | DEF_PARAM | DEF_NONLOCAL)
[103] Fix | Delete
[104] Fix | Delete
#define LOCAL 1
[105] Fix | Delete
#define GLOBAL_EXPLICIT 2
[106] Fix | Delete
#define GLOBAL_IMPLICIT 3
[107] Fix | Delete
#define FREE 4
[108] Fix | Delete
#define CELL 5
[109] Fix | Delete
[110] Fix | Delete
#define GENERATOR 1
[111] Fix | Delete
#define GENERATOR_EXPRESSION 2
[112] Fix | Delete
[113] Fix | Delete
#ifdef __cplusplus
[114] Fix | Delete
}
[115] Fix | Delete
#endif
[116] Fix | Delete
#endif /* !Py_SYMTABLE_H */
[117] Fix | Delete
#endif /* Py_LIMITED_API */
[118] Fix | Delete
[119] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function