Back to index

python3.2  3.2.2
Classes | Defines | Typedefs | Enumerations | Functions | Variables
symtable.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  symtable
struct  _symtable_entry

Defines

#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 DEF_NONLOCAL   2<<2 /* nonlocal stmt */
#define USE   2<<3 /* name is used */
#define DEF_FREE   2<<4 /* name used but not defined in nested block */
#define DEF_FREE_CLASS   2<<5 /* free variable from class's method */
#define DEF_IMPORT   2<<6 /* assignment occurred via import */
#define DEF_BOUND   (DEF_LOCAL | DEF_PARAM | DEF_IMPORT)
#define SCOPE_OFFSET   11
#define SCOPE_MASK   (DEF_GLOBAL | DEF_LOCAL | DEF_PARAM | DEF_NONLOCAL)
#define LOCAL   1
#define GLOBAL_EXPLICIT   2
#define GLOBAL_IMPLICIT   3
#define FREE   4
#define CELL   5
#define OPT_IMPORT_STAR   1
#define OPT_TOPLEVEL   2 /* 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 mod
 PyAPI_FUNC (PySTEntryObject *) PySymtable_Lookup(struct symtable *
voidPyAPI_FUNC (void) PySymtable_Free(struct symtable *)

Variables

PyObject const char * filename
PyObject const char
PyFutureFeatures
future

Class Documentation

struct _symtable_entry

Definition at line 32 of file symtable.h.

Collaboration diagram for _symtable_entry:
Class Members
unsigned ste_child_free: 1
PyObject * ste_children
int ste_col_offset
unsigned ste_free: 1
unsigned ste_generator: 1
PyObject_HEAD PyObject * ste_id
int ste_lineno
PyObject * ste_name
int ste_nested
int ste_opt_col_offset
int ste_opt_lineno
unsigned ste_returns_value: 1
PyObject * ste_symbols
struct symtable * ste_table
int ste_tmpname
_Py_block_ty ste_type
int ste_unoptimized
unsigned ste_varargs: 1
unsigned ste_varkeywords: 1
PyObject * ste_varnames

Define Documentation

#define CELL   5

Definition at line 96 of file symtable.h.

Definition at line 83 of file symtable.h.

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

Definition at line 79 of file symtable.h.

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

Definition at line 80 of file symtable.h.

#define DEF_GLOBAL   1 /* global stmt */

Definition at line 74 of file symtable.h.

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

Definition at line 81 of file symtable.h.

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

Definition at line 75 of file symtable.h.

#define DEF_NONLOCAL   2<<2 /* nonlocal stmt */

Definition at line 77 of file symtable.h.

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

Definition at line 76 of file symtable.h.

#define FREE   4

Definition at line 95 of file symtable.h.

#define GENERATOR   1

Definition at line 102 of file symtable.h.

#define GENERATOR_EXPRESSION   2

Definition at line 103 of file symtable.h.

#define GLOBAL_EXPLICIT   2

Definition at line 93 of file symtable.h.

#define GLOBAL_IMPLICIT   3

Definition at line 94 of file symtable.h.

#define LOCAL   1

Definition at line 92 of file symtable.h.

#define OPT_IMPORT_STAR   1

Definition at line 99 of file symtable.h.

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

Definition at line 100 of file symtable.h.

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

Definition at line 60 of file symtable.h.

Definition at line 90 of file symtable.h.

#define SCOPE_OFFSET   11

Definition at line 89 of file symtable.h.

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

Definition at line 78 of file symtable.h.


Typedef Documentation

typedef enum _block_type _Py_block_ty

Enumeration Type Documentation

Enumerator:
FunctionBlock 
ClassBlock 
ModuleBlock 

Definition at line 13 of file symtable.h.


Function Documentation

PyAPI_FUNC ( int  ) [read]

Definition at line 2410 of file pythonrun.c.

PyObject* PyAPI_FUNC ( struct symtable )

Definition at line 1904 of file object.c.


Variable Documentation

Definition at line 66 of file symtable.h.

Definition at line 66 of file symtable.h.