⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢠⣴⣿⣿⣿⣷⣼⣿⠀⣴⠾⠷⠶⠦⡄⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢠⡤⢶⣦⣾⣿⣿⣿⣿⣿⣿⣿⠀⣿⣶⣶⣦⣄⠳⣤⣤⠄⠀⠀⠀
⠀⠀⠀⢀⣼⣳⡿⢻⣿⣿⣿⣿⣿⣿⣿⣿⣶⣿⣿⣗⠈⠙⠻⣶⣄⡀⠀⠀⠀
⠀⠀⠀⣰⠿⠁⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠈⠳⣤⠀⠀
⠀⠀⢀⡟⠀⢰⣿⠟⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⠉⠁⠈⠻⣶⣄⠀⠀⠈⠛⢦   
⠀⣀⡼⠃⠀⣼⡟⠀⠀⢸⣿⡿⠉⣿⡿⠿⠛⣿⡄⠀⠀⠀⠙⠿⣆⠀⠀⠀⠈
⠈⠁⠀⠀⢸⡟⠀⠀⠀⢸⣿⠀⠀⣿⠁⠀⠀⠈⠃⠀⠀⠀⠀⠀⠘⢷⡄⠀⠀
⠀⠀⠀⠀⣼⠃⠀⠀⠀⢸⡟⠀⠀⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⡆⠀
⠀⠀⠀⣠⡏⠀⠀⠀⠀⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠻⠃⠀⠀⠀⠀⣻⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ 
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Current Dir: /usr/include/python2.7/

[FILE] Python-ast.h [ edit | delete | rename | download ]
[FILE] Python.h [ edit | delete | rename | download ]
[FILE] abstract.h [ edit | delete | rename | download ]
[FILE] asdl.h [ edit | delete | rename | download ]
[FILE] ast.h [ edit | delete | rename | download ]
[FILE] bitset.h [ edit | delete | rename | download ]
[FILE] boolobject.h [ edit | delete | rename | download ]
[FILE] bufferobject.h [ edit | delete | rename | download ]
[FILE] bytearrayobject.h [ edit | delete | rename | download ]
[FILE] bytes_methods.h [ edit | delete | rename | download ]
[FILE] bytesobject.h [ edit | delete | rename | download ]
[FILE] cStringIO.h [ edit | delete | rename | download ]
[FILE] cellobject.h [ edit | delete | rename | download ]
[FILE] ceval.h [ edit | delete | rename | download ]
[FILE] classobject.h [ edit | delete | rename | download ]
[FILE] cobject.h [ edit | delete | rename | download ]
[FILE] code.h [ edit | delete | rename | download ]
[FILE] codecs.h [ edit | delete | rename | download ]
[FILE] compile.h [ edit | delete | rename | download ]
[FILE] complexobject.h [ edit | delete | rename | download ]
[FILE] datetime.h [ edit | delete | rename | download ]
[FILE] descrobject.h [ edit | delete | rename | download ]
[FILE] dictobject.h [ edit | delete | rename | download ]
[FILE] dtoa.h [ edit | delete | rename | download ]
[FILE] enumobject.h [ edit | delete | rename | download ]
[FILE] errcode.h [ edit | delete | rename | download ]
[FILE] eval.h [ edit | delete | rename | download ]
[FILE] fileobject.h [ edit | delete | rename | download ]
[FILE] floatobject.h [ edit | delete | rename | download ]
[FILE] frameobject.h [ edit | delete | rename | download ]
[FILE] funcobject.h [ edit | delete | rename | download ]
[FILE] genobject.h [ edit | delete | rename | download ]
[FILE] graminit.h [ edit | delete | rename | download ]
[FILE] grammar.h [ edit | delete | rename | download ]
[FILE] import.h [ edit | delete | rename | download ]
[FILE] intobject.h [ edit | delete | rename | download ]
[FILE] intrcheck.h [ edit | delete | rename | download ]
[FILE] iterobject.h [ edit | delete | rename | download ]
[FILE] listobject.h [ edit | delete | rename | download ]
[FILE] longintrepr.h [ edit | delete | rename | download ]
[FILE] longobject.h [ edit | delete | rename | download ]
[FILE] marshal.h [ edit | delete | rename | download ]
[FILE] memoryobject.h [ edit | delete | rename | download ]
[FILE] metagrammar.h [ edit | delete | rename | download ]
[FILE] methodobject.h [ edit | delete | rename | download ]
[FILE] modsupport.h [ edit | delete | rename | download ]
[FILE] moduleobject.h [ edit | delete | rename | download ]
[FILE] node.h [ edit | delete | rename | download ]
[FILE] object.h [ edit | delete | rename | download ]
[FILE] objimpl.h [ edit | delete | rename | download ]
[FILE] opcode.h [ edit | delete | rename | download ]
[FILE] osdefs.h [ edit | delete | rename | download ]
[FILE] parsetok.h [ edit | delete | rename | download ]
[FILE] patchlevel.h [ edit | delete | rename | download ]
[FILE] pgen.h [ edit | delete | rename | download ]
[FILE] pgenheaders.h [ edit | delete | rename | download ]
[FILE] py_curses.h [ edit | delete | rename | download ]
[FILE] pyarena.h [ edit | delete | rename | download ]
[FILE] pycapsule.h [ edit | delete | rename | download ]
[FILE] pyconfig-64.h [ edit | delete | rename | download ]
[FILE] pyconfig.h [ edit | delete | rename | download ]
[FILE] pyctype.h [ edit | delete | rename | download ]
[FILE] pydebug.h [ edit | delete | rename | download ]
[FILE] pyerrors.h [ edit | delete | rename | download ]
[FILE] pyexpat.h [ edit | delete | rename | download ]
[FILE] pyfpe.h [ edit | delete | rename | download ]
[FILE] pygetopt.h [ edit | delete | rename | download ]
[FILE] pymacconfig.h [ edit | delete | rename | download ]
[FILE] pymactoolbox.h [ edit | delete | rename | download ]
[FILE] pymath.h [ edit | delete | rename | download ]
[FILE] pymem.h [ edit | delete | rename | download ]
[FILE] pyport.h [ edit | delete | rename | download ]
[FILE] pystate.h [ edit | delete | rename | download ]
[FILE] pystrcmp.h [ edit | delete | rename | download ]
[FILE] pystrtod.h [ edit | delete | rename | download ]
[FILE] pythonrun.h [ edit | delete | rename | download ]
[FILE] pythread.h [ edit | delete | rename | download ]
[FILE] rangeobject.h [ edit | delete | rename | download ]
[FILE] setobject.h [ edit | delete | rename | download ]
[FILE] sliceobject.h [ edit | delete | rename | download ]
[FILE] stringobject.h [ edit | delete | rename | download ]
[FILE] structmember.h [ edit | delete | rename | download ]
[FILE] structseq.h [ edit | delete | rename | download ]
[FILE] symtable.h [ edit | delete | rename | download ]
[FILE] sysmodule.h [ edit | delete | rename | download ]
[FILE] timefuncs.h [ edit | delete | rename | download ]
[FILE] token.h [ edit | delete | rename | download ]
[FILE] traceback.h [ edit | delete | rename | download ]
[FILE] tupleobject.h [ edit | delete | rename | download ]
[FILE] ucnhash.h [ edit | delete | rename | download ]
[FILE] unicodeobject.h [ edit | delete | rename | download ]
[FILE] warnings.h [ edit | delete | rename | download ]
[FILE] weakrefobject.h [ edit | delete | rename | download ]

Viewing: /usr/include/python2.7/symtable.h

#ifndef Py_SYMTABLE_H
#define Py_SYMTABLE_H

#ifdef __cplusplus
extern "C" {
#endif

typedef enum _block_type { FunctionBlock, ClassBlock, ModuleBlock }
    _Py_block_ty;

struct _symtable_entry;

struct symtable {
    const char *st_filename; /* name of file being compiled */
    struct _symtable_entry *st_cur; /* current symbol table entry */
    struct _symtable_entry *st_top; /* module entry */
    PyObject *st_symbols;    /* dictionary of symbol table entries */
    PyObject *st_stack;      /* stack of namespace info */
    PyObject *st_global;     /* borrowed ref to MODULE in st_symbols */
    int st_nblocks;          /* number of blocks */
    PyObject *st_private;        /* name of current class or NULL */
    PyFutureFeatures *st_future; /* module's future features */
};

typedef struct _symtable_entry {
    PyObject_HEAD
    PyObject *ste_id;        /* int: key in st_symbols */
    PyObject *ste_symbols;   /* dict: name to flags */
    PyObject *ste_name;      /* string: name of block */
    PyObject *ste_varnames;  /* list of variable names */
    PyObject *ste_children;  /* list of child ids */
    _Py_block_ty ste_type;   /* module, class, or function */
    int ste_unoptimized;     /* false if namespace is optimized */
    int ste_nested;      /* true if block is nested */
    unsigned ste_free : 1;        /* true if block has free variables */
    unsigned ste_child_free : 1;  /* true if a child block has free vars,
                                     including free refs to globals */
    unsigned ste_generator : 1;   /* true if namespace is a generator */
    unsigned ste_varargs : 1;     /* true if block has varargs */
    unsigned ste_varkeywords : 1; /* true if block has varkeywords */
    unsigned ste_returns_value : 1;  /* true if namespace uses return with
                                        an argument */
    int ste_lineno;          /* first line of block */
    int ste_opt_lineno;      /* lineno of last exec or import * */
    int ste_tmpname;         /* counter for listcomp temp vars */
    struct symtable *ste_table;
} PySTEntryObject;

PyAPI_DATA(PyTypeObject) PySTEntry_Type;

#define PySTEntry_Check(op) (Py_TYPE(op) == &PySTEntry_Type)

PyAPI_FUNC(int) PyST_GetScope(PySTEntryObject *, PyObject *);

PyAPI_FUNC(struct symtable *) PySymtable_Build(mod_ty, const char *,
                                              PyFutureFeatures *);
PyAPI_FUNC(PySTEntryObject *) PySymtable_Lookup(struct symtable *, void *);

PyAPI_FUNC(void) PySymtable_Free(struct symtable *);

/* Flags for def-use information */

#define DEF_GLOBAL 1           /* global stmt */
#define DEF_LOCAL 2            /* assignment in code block */
#define DEF_PARAM 2<<1         /* formal parameter */
#define USE 2<<2               /* name is used */
#define DEF_FREE 2<<3         /* name used but not defined in nested block */
#define DEF_FREE_CLASS 2<<4    /* free variable from class's method */
#define DEF_IMPORT 2<<5        /* assignment occurred via import */

#define DEF_BOUND (DEF_LOCAL | DEF_PARAM | DEF_IMPORT)

/* GLOBAL_EXPLICIT and GLOBAL_IMPLICIT are used internally by the symbol
   table.  GLOBAL is returned from PyST_GetScope() for either of them.
   It is stored in ste_symbols at bits 12-14.
*/
#define SCOPE_OFF 11
#define SCOPE_MASK 7

#define LOCAL 1
#define GLOBAL_EXPLICIT 2
#define GLOBAL_IMPLICIT 3
#define FREE 4
#define CELL 5

/* The following three names are used for the ste_unoptimized bit field */
#define OPT_IMPORT_STAR 1
#define OPT_EXEC 2
#define OPT_BARE_EXEC 4
#define OPT_TOPLEVEL 8  /* top-level names, including eval and exec */

#define GENERATOR 1
#define GENERATOR_EXPRESSION 2

#ifdef __cplusplus
}
#endif
#endif /* !Py_SYMTABLE_H */

Upload File: