Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Include/setobject.h

    r2 r391  
    2323
    2424typedef struct {
    25         long hash;      /* cached hash code for the entry key */
    26         PyObject *key;
     25    long hash;      /* cached hash code for the entry key */
     26    PyObject *key;
    2727} setentry;
    2828
     
    3434typedef struct _setobject PySetObject;
    3535struct _setobject {
    36         PyObject_HEAD
     36    PyObject_HEAD
    3737
    38         Py_ssize_t fill;  /* # Active + # Dummy */
    39         Py_ssize_t used;  /* # Active */
     38    Py_ssize_t fill;  /* # Active + # Dummy */
     39    Py_ssize_t used;  /* # Active */
    4040
    41         /* The table contains mask + 1 slots, and that's a power of 2.
    42         * We store the mask instead of the size because the mask is more
    43         * frequently needed.
    44         */
    45         Py_ssize_t mask;
     41    /* The table contains mask + 1 slots, and that's a power of 2.
     42    * We store the mask instead of the size because the mask is more
     43    * frequently needed.
     44    */
     45    Py_ssize_t mask;
    4646
    47         /* table points to smalltable for small tables, else to
    48         * additional malloc'ed memory.  table is never NULL!  This rule
    49         * saves repeated runtime null-tests.
    50         */
    51         setentry *table;
    52         setentry *(*lookup)(PySetObject *so, PyObject *key, long hash);
    53         setentry smalltable[PySet_MINSIZE];
     47    /* table points to smalltable for small tables, else to
     48    * additional malloc'ed memory.  table is never NULL!  This rule
     49    * saves repeated runtime null-tests.
     50    */
     51    setentry *table;
     52    setentry *(*lookup)(PySetObject *so, PyObject *key, long hash);
     53    setentry smalltable[PySet_MINSIZE];
    5454
    55         long hash;              /* only used by frozenset objects */
    56         PyObject *weakreflist;  /* List of weak references */
     55    long hash;                  /* only used by frozenset objects */
     56    PyObject *weakreflist;      /* List of weak references */
    5757};
    5858
     
    6969#define PyFrozenSet_CheckExact(ob) (Py_TYPE(ob) == &PyFrozenSet_Type)
    7070#define PyAnySet_CheckExact(ob) \
    71         (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type)
     71    (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type)
    7272#define PyAnySet_Check(ob) \
    73         (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type || \
    74           PyType_IsSubtype(Py_TYPE(ob), &PySet_Type) || \
    75           PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
     73    (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type || \
     74      PyType_IsSubtype(Py_TYPE(ob), &PySet_Type) || \
     75      PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
    7676#define PySet_Check(ob) \
    77         (Py_TYPE(ob) == &PySet_Type || \
    78         PyType_IsSubtype(Py_TYPE(ob), &PySet_Type))
     77    (Py_TYPE(ob) == &PySet_Type || \
     78    PyType_IsSubtype(Py_TYPE(ob), &PySet_Type))
    7979#define   PyFrozenSet_Check(ob) \
    80         (Py_TYPE(ob) == &PyFrozenSet_Type || \
    81           PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
     80    (Py_TYPE(ob) == &PyFrozenSet_Type || \
     81      PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
    8282
    8383PyAPI_FUNC(PyObject *) PySet_New(PyObject *);
Note: See TracChangeset for help on using the changeset viewer.