Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/python2....
File: symtable.h
#ifndef Py_SYMTABLE_H
[0] Fix | Delete
#define Py_SYMTABLE_H
[1] Fix | Delete
[2] Fix | Delete
#ifdef __cplusplus
[3] Fix | Delete
extern "C" {
[4] Fix | Delete
#endif
[5] Fix | Delete
[6] Fix | Delete
typedef enum _block_type { FunctionBlock, ClassBlock, ModuleBlock }
[7] Fix | Delete
_Py_block_ty;
[8] Fix | Delete
[9] Fix | Delete
struct _symtable_entry;
[10] Fix | Delete
[11] Fix | Delete
struct symtable {
[12] Fix | Delete
const char *st_filename; /* name of file being compiled */
[13] Fix | Delete
struct _symtable_entry *st_cur; /* current symbol table entry */
[14] Fix | Delete
struct _symtable_entry *st_top; /* module entry */
[15] Fix | Delete
PyObject *st_symbols; /* dictionary of symbol table entries */
[16] Fix | Delete
PyObject *st_stack; /* stack of namespace info */
[17] Fix | Delete
PyObject *st_global; /* borrowed ref to MODULE in st_symbols */
[18] Fix | Delete
int st_nblocks; /* number of blocks */
[19] Fix | Delete
PyObject *st_private; /* name of current class or NULL */
[20] Fix | Delete
PyFutureFeatures *st_future; /* module's future features */
[21] Fix | Delete
};
[22] Fix | Delete
[23] Fix | Delete
typedef struct _symtable_entry {
[24] Fix | Delete
PyObject_HEAD
[25] Fix | Delete
PyObject *ste_id; /* int: key in st_symbols */
[26] Fix | Delete
PyObject *ste_symbols; /* dict: name to flags */
[27] Fix | Delete
PyObject *ste_name; /* string: name of block */
[28] Fix | Delete
PyObject *ste_varnames; /* list of variable names */
[29] Fix | Delete
PyObject *ste_children; /* list of child ids */
[30] Fix | Delete
_Py_block_ty ste_type; /* module, class, or function */
[31] Fix | Delete
int ste_unoptimized; /* false if namespace is optimized */
[32] Fix | Delete
int ste_nested; /* true if block is nested */
[33] Fix | Delete
unsigned ste_free : 1; /* true if block has free variables */
[34] Fix | Delete
unsigned ste_child_free : 1; /* true if a child block has free vars,
[35] Fix | Delete
including free refs to globals */
[36] Fix | Delete
unsigned ste_generator : 1; /* true if namespace is a generator */
[37] Fix | Delete
unsigned ste_varargs : 1; /* true if block has varargs */
[38] Fix | Delete
unsigned ste_varkeywords : 1; /* true if block has varkeywords */
[39] Fix | Delete
unsigned ste_returns_value : 1; /* true if namespace uses return with
[40] Fix | Delete
an argument */
[41] Fix | Delete
int ste_lineno; /* first line of block */
[42] Fix | Delete
int ste_opt_lineno; /* lineno of last exec or import * */
[43] Fix | Delete
int ste_tmpname; /* counter for listcomp temp vars */
[44] Fix | Delete
struct symtable *ste_table;
[45] Fix | Delete
} PySTEntryObject;
[46] Fix | Delete
[47] Fix | Delete
PyAPI_DATA(PyTypeObject) PySTEntry_Type;
[48] Fix | Delete
[49] Fix | Delete
#define PySTEntry_Check(op) (Py_TYPE(op) == &PySTEntry_Type)
[50] Fix | Delete
[51] Fix | Delete
PyAPI_FUNC(int) PyST_GetScope(PySTEntryObject *, PyObject *);
[52] Fix | Delete
[53] Fix | Delete
PyAPI_FUNC(struct symtable *) PySymtable_Build(mod_ty, const char *,
[54] Fix | Delete
PyFutureFeatures *);
[55] Fix | Delete
PyAPI_FUNC(PySTEntryObject *) PySymtable_Lookup(struct symtable *, void *);
[56] Fix | Delete
[57] Fix | Delete
PyAPI_FUNC(void) PySymtable_Free(struct symtable *);
[58] Fix | Delete
[59] Fix | Delete
/* Flags for def-use information */
[60] Fix | Delete
[61] Fix | Delete
#define DEF_GLOBAL 1 /* global stmt */
[62] Fix | Delete
#define DEF_LOCAL 2 /* assignment in code block */
[63] Fix | Delete
#define DEF_PARAM 2<<1 /* formal parameter */
[64] Fix | Delete
#define USE 2<<2 /* name is used */
[65] Fix | Delete
#define DEF_FREE 2<<3 /* name used but not defined in nested block */
[66] Fix | Delete
#define DEF_FREE_CLASS 2<<4 /* free variable from class's method */
[67] Fix | Delete
#define DEF_IMPORT 2<<5 /* assignment occurred via import */
[68] Fix | Delete
[69] Fix | Delete
#define DEF_BOUND (DEF_LOCAL | DEF_PARAM | DEF_IMPORT)
[70] Fix | Delete
[71] Fix | Delete
/* GLOBAL_EXPLICIT and GLOBAL_IMPLICIT are used internally by the symbol
[72] Fix | Delete
table. GLOBAL is returned from PyST_GetScope() for either of them.
[73] Fix | Delete
It is stored in ste_symbols at bits 12-14.
[74] Fix | Delete
*/
[75] Fix | Delete
#define SCOPE_OFF 11
[76] Fix | Delete
#define SCOPE_MASK 7
[77] Fix | Delete
[78] Fix | Delete
#define LOCAL 1
[79] Fix | Delete
#define GLOBAL_EXPLICIT 2
[80] Fix | Delete
#define GLOBAL_IMPLICIT 3
[81] Fix | Delete
#define FREE 4
[82] Fix | Delete
#define CELL 5
[83] Fix | Delete
[84] Fix | Delete
/* The following three names are used for the ste_unoptimized bit field */
[85] Fix | Delete
#define OPT_IMPORT_STAR 1
[86] Fix | Delete
#define OPT_EXEC 2
[87] Fix | Delete
#define OPT_BARE_EXEC 4
[88] Fix | Delete
#define OPT_TOPLEVEL 8 /* top-level names, including eval and exec */
[89] Fix | Delete
[90] Fix | Delete
#define GENERATOR 1
[91] Fix | Delete
#define GENERATOR_EXPRESSION 2
[92] Fix | Delete
[93] Fix | Delete
#ifdef __cplusplus
[94] Fix | Delete
}
[95] Fix | Delete
#endif
[96] Fix | Delete
#endif /* !Py_SYMTABLE_H */
[97] Fix | Delete
[98] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function