python-2.7.6/include/symtable.h File Reference

symtable.h File Reference

Classes

struct  symtable
 
struct  _symtable_entry
 

Macros

#define PySTEntry_Check(op)   (Py_TYPE(op) == &PySTEntry_Type)
 
#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)
 
#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
 
#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
 

Typedefs

typedef enum _block_type  _Py_block_ty
 
typedef struct _symtable_entry PySTEntryObject
 

Enumerations

enum  _block_type { FunctionBlock, ClassBlock, ModuleBlock }
 

Functions

 PyAPI_DATA (PyTypeObject) PySTEntry_Type
 
 PyAPI_FUNC (int) PyST_GetScope(PySTEntryObject *
 
PyObjectPyAPI_FUNC (struct symtable *) PySymtable_Build(mod_ty
 
PyObject const char PyFutureFeaturesPyAPI_FUNC (PySTEntryObject *) PySymtable_Lookup(struct symtable *
 
PyObject const char PyFutureFeatures void * PyAPI_FUNC (void) PySymtable_Free(struct symtable *)
 

Macro Definition Documentation

#define CELL   5

Definition at line 84 of file symtable.h.

#define DEF_BOUND   (DEF_LOCAL | DEF_PARAM | DEF_IMPORT)

Definition at line 71 of file symtable.h.

#define DEF_FREE   2<<3 /* name used but not defined in nested block */

Definition at line 67 of file symtable.h.

#define DEF_FREE_CLASS   2<<4 /* free variable from class's method */

Definition at line 68 of file symtable.h.

#define DEF_GLOBAL   1 /* global stmt */

Definition at line 63 of file symtable.h.

#define DEF_IMPORT   2<<5 /* assignment occurred via import */

Definition at line 69 of file symtable.h.

#define DEF_LOCAL   2 /* assignment in code block */

Definition at line 64 of file symtable.h.

#define DEF_PARAM   2<<1 /* formal parameter */

Definition at line 65 of file symtable.h.

#define FREE   4

Definition at line 83 of file symtable.h.

#define GENERATOR   1

Definition at line 92 of file symtable.h.

#define GENERATOR_EXPRESSION   2

Definition at line 93 of file symtable.h.

#define GLOBAL_EXPLICIT   2

Definition at line 81 of file symtable.h.

#define GLOBAL_IMPLICIT   3

Definition at line 82 of file symtable.h.

#define LOCAL   1

Definition at line 80 of file symtable.h.

#define OPT_BARE_EXEC   4

Definition at line 89 of file symtable.h.

#define OPT_EXEC   2

Definition at line 88 of file symtable.h.

#define OPT_IMPORT_STAR   1

Definition at line 87 of file symtable.h.

#define OPT_TOPLEVEL   8 /* top-level names, including eval and exec */

Definition at line 90 of file symtable.h.

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

Definition at line 51 of file symtable.h.

#define SCOPE_MASK   7

Definition at line 78 of file symtable.h.

#define SCOPE_OFF   11

Definition at line 77 of file symtable.h.

#define USE   2<<2 /* name is used */

Definition at line 66 of file symtable.h.

Typedef Documentation

typedef enum _block_type _Py_block_ty

Enumeration Type Documentation

Enumerator
FunctionBlock 
ClassBlock 
ModuleBlock 

Definition at line 8 of file symtable.h.

Function Documentation

PyAPI_DATA ( PyTypeObject  )
PyAPI_FUNC ( int  )
PyObject* PyAPI_FUNC ( struct symtable )
PyObject const char PyFutureFeatures* PyAPI_FUNC ( PySTEntryObject )
PyObject const char PyFutureFeatures void* PyAPI_FUNC ( void  )

Go to the source code of this file.