Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Include/symtable.h

    r2 r388  
    1212
    1313struct symtable {
    14         const char *st_filename; /* name of file being compiled */
    15         struct _symtable_entry *st_cur; /* current symbol table entry */
    16         struct _symtable_entry *st_top; /* module entry */
    17         PyObject *st_symbols;    /* dictionary of symbol table entries */
    18         PyObject *st_stack;      /* stack of namespace info */
    19         PyObject *st_global;     /* borrowed ref to MODULE in st_symbols */
    20         int st_nblocks;          /* number of blocks */
    21         PyObject *st_private;        /* name of current class or NULL */
    22         int st_tmpname;          /* temporary name counter */
    23         PyFutureFeatures *st_future; /* module's future features */
     14    const char *st_filename; /* name of file being compiled */
     15    struct _symtable_entry *st_cur; /* current symbol table entry */
     16    struct _symtable_entry *st_top; /* module entry */
     17    PyObject *st_symbols;    /* dictionary of symbol table entries */
     18    PyObject *st_stack;      /* stack of namespace info */
     19    PyObject *st_global;     /* borrowed ref to MODULE in st_symbols */
     20    int st_nblocks;          /* number of blocks */
     21    PyObject *st_private;        /* name of current class or NULL */
     22    PyFutureFeatures *st_future; /* module's future features */
    2423};
    2524
    2625typedef struct _symtable_entry {
    27         PyObject_HEAD
    28         PyObject *ste_id;        /* int: key in st_symbols */
    29         PyObject *ste_symbols;   /* dict: name to flags */
    30         PyObject *ste_name;      /* string: name of block */
    31         PyObject *ste_varnames;  /* list of variable names */
    32         PyObject *ste_children;  /* list of child ids */
    33         _Py_block_ty ste_type;   /* module, class, or function */
    34         int ste_unoptimized;     /* false if namespace is optimized */
    35         int ste_nested;      /* true if block is nested */
    36         unsigned ste_free : 1;        /* true if block has free variables */
    37         unsigned ste_child_free : 1;  /* true if a child block has free vars,
    38                                          including free refs to globals */
    39         unsigned ste_generator : 1;   /* true if namespace is a generator */
    40         unsigned ste_varargs : 1;     /* true if block has varargs */
    41         unsigned ste_varkeywords : 1; /* true if block has varkeywords */
    42         unsigned ste_returns_value : 1;  /* true if namespace uses return with
    43                                             an argument */
    44         int ste_lineno;          /* first line of block */
    45         int ste_opt_lineno;      /* lineno of last exec or import * */
    46         int ste_tmpname;         /* counter for listcomp temp vars */
    47         struct symtable *ste_table;
     26    PyObject_HEAD
     27    PyObject *ste_id;        /* int: key in st_symbols */
     28    PyObject *ste_symbols;   /* dict: name to flags */
     29    PyObject *ste_name;      /* string: name of block */
     30    PyObject *ste_varnames;  /* list of variable names */
     31    PyObject *ste_children;  /* list of child ids */
     32    _Py_block_ty ste_type;   /* module, class, or function */
     33    int ste_unoptimized;     /* false if namespace is optimized */
     34    int ste_nested;      /* true if block is nested */
     35    unsigned ste_free : 1;        /* true if block has free variables */
     36    unsigned ste_child_free : 1;  /* true if a child block has free vars,
     37                                     including free refs to globals */
     38    unsigned ste_generator : 1;   /* true if namespace is a generator */
     39    unsigned ste_varargs : 1;     /* true if block has varargs */
     40    unsigned ste_varkeywords : 1; /* true if block has varkeywords */
     41    unsigned ste_returns_value : 1;  /* true if namespace uses return with
     42                                        an argument */
     43    int ste_lineno;          /* first line of block */
     44    int ste_opt_lineno;      /* lineno of last exec or import * */
     45    int ste_tmpname;         /* counter for listcomp temp vars */
     46    struct symtable *ste_table;
    4847} PySTEntryObject;
    4948
     
    5453PyAPI_FUNC(int) PyST_GetScope(PySTEntryObject *, PyObject *);
    5554
    56 PyAPI_FUNC(struct symtable *) PySymtable_Build(mod_ty, const char *, 
    57                                               PyFutureFeatures *);
     55PyAPI_FUNC(struct symtable *) PySymtable_Build(mod_ty, const char *,
     56                                              PyFutureFeatures *);
    5857PyAPI_FUNC(PySTEntryObject *) PySymtable_Lookup(struct symtable *, void *);
    5958
     
    6665#define DEF_PARAM 2<<1         /* formal parameter */
    6766#define USE 2<<2               /* name is used */
    68 #define DEF_STAR 2<<3          /* parameter is star arg */
    69 #define DEF_DOUBLESTAR 2<<4    /* parameter is star-star arg */
    70 #define DEF_INTUPLE 2<<5       /* name defined in tuple in parameters */
    71 #define DEF_FREE 2<<6          /* name used but not defined in nested block */
    72 #define DEF_FREE_GLOBAL 2<<7   /* free variable is actually implicit global */
    73 #define DEF_FREE_CLASS 2<<8    /* free variable from class's method */
    74 #define DEF_IMPORT 2<<9        /* assignment occurred via import */
     67#define DEF_FREE 2<<3         /* name used but not defined in nested block */
     68#define DEF_FREE_CLASS 2<<4    /* free variable from class's method */
     69#define DEF_IMPORT 2<<5        /* assignment occurred via import */
    7570
    7671#define DEF_BOUND (DEF_LOCAL | DEF_PARAM | DEF_IMPORT)
    7772
    7873/* GLOBAL_EXPLICIT and GLOBAL_IMPLICIT are used internally by the symbol
    79    table.  GLOBAL is returned from PyST_GetScope() for either of them. 
     74   table.  GLOBAL is returned from PyST_GetScope() for either of them.
    8075   It is stored in ste_symbols at bits 12-14.
    8176*/
Note: See TracChangeset for help on using the changeset viewer.