Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/python2....
File: setobject.h
/* Set object interface */
[0] Fix | Delete
[1] Fix | Delete
#ifndef Py_SETOBJECT_H
[2] Fix | Delete
#define Py_SETOBJECT_H
[3] Fix | Delete
#ifdef __cplusplus
[4] Fix | Delete
extern "C" {
[5] Fix | Delete
#endif
[6] Fix | Delete
[7] Fix | Delete
[8] Fix | Delete
/*
[9] Fix | Delete
There are three kinds of slots in the table:
[10] Fix | Delete
[11] Fix | Delete
1. Unused: key == NULL
[12] Fix | Delete
2. Active: key != NULL and key != dummy
[13] Fix | Delete
3. Dummy: key == dummy
[14] Fix | Delete
[15] Fix | Delete
Note: .pop() abuses the hash field of an Unused or Dummy slot to
[16] Fix | Delete
hold a search finger. The hash field of Unused or Dummy slots has
[17] Fix | Delete
no meaning otherwise.
[18] Fix | Delete
*/
[19] Fix | Delete
[20] Fix | Delete
#define PySet_MINSIZE 8
[21] Fix | Delete
[22] Fix | Delete
typedef struct {
[23] Fix | Delete
long hash; /* cached hash code for the entry key */
[24] Fix | Delete
PyObject *key;
[25] Fix | Delete
} setentry;
[26] Fix | Delete
[27] Fix | Delete
[28] Fix | Delete
/*
[29] Fix | Delete
This data structure is shared by set and frozenset objects.
[30] Fix | Delete
*/
[31] Fix | Delete
[32] Fix | Delete
typedef struct _setobject PySetObject;
[33] Fix | Delete
struct _setobject {
[34] Fix | Delete
PyObject_HEAD
[35] Fix | Delete
[36] Fix | Delete
Py_ssize_t fill; /* # Active + # Dummy */
[37] Fix | Delete
Py_ssize_t used; /* # Active */
[38] Fix | Delete
[39] Fix | Delete
/* The table contains mask + 1 slots, and that's a power of 2.
[40] Fix | Delete
* We store the mask instead of the size because the mask is more
[41] Fix | Delete
* frequently needed.
[42] Fix | Delete
*/
[43] Fix | Delete
Py_ssize_t mask;
[44] Fix | Delete
[45] Fix | Delete
/* table points to smalltable for small tables, else to
[46] Fix | Delete
* additional malloc'ed memory. table is never NULL! This rule
[47] Fix | Delete
* saves repeated runtime null-tests.
[48] Fix | Delete
*/
[49] Fix | Delete
setentry *table;
[50] Fix | Delete
setentry *(*lookup)(PySetObject *so, PyObject *key, long hash);
[51] Fix | Delete
setentry smalltable[PySet_MINSIZE];
[52] Fix | Delete
[53] Fix | Delete
long hash; /* only used by frozenset objects */
[54] Fix | Delete
PyObject *weakreflist; /* List of weak references */
[55] Fix | Delete
};
[56] Fix | Delete
[57] Fix | Delete
PyAPI_DATA(PyTypeObject) PySet_Type;
[58] Fix | Delete
PyAPI_DATA(PyTypeObject) PyFrozenSet_Type;
[59] Fix | Delete
[60] Fix | Delete
/* Invariants for frozensets:
[61] Fix | Delete
* data is immutable.
[62] Fix | Delete
* hash is the hash of the frozenset or -1 if not computed yet.
[63] Fix | Delete
* Invariants for sets:
[64] Fix | Delete
* hash is -1
[65] Fix | Delete
*/
[66] Fix | Delete
[67] Fix | Delete
#define PyFrozenSet_CheckExact(ob) (Py_TYPE(ob) == &PyFrozenSet_Type)
[68] Fix | Delete
#define PyAnySet_CheckExact(ob) \
[69] Fix | Delete
(Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type)
[70] Fix | Delete
#define PyAnySet_Check(ob) \
[71] Fix | Delete
(Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type || \
[72] Fix | Delete
PyType_IsSubtype(Py_TYPE(ob), &PySet_Type) || \
[73] Fix | Delete
PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
[74] Fix | Delete
#define PySet_Check(ob) \
[75] Fix | Delete
(Py_TYPE(ob) == &PySet_Type || \
[76] Fix | Delete
PyType_IsSubtype(Py_TYPE(ob), &PySet_Type))
[77] Fix | Delete
#define PyFrozenSet_Check(ob) \
[78] Fix | Delete
(Py_TYPE(ob) == &PyFrozenSet_Type || \
[79] Fix | Delete
PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
[80] Fix | Delete
[81] Fix | Delete
PyAPI_FUNC(PyObject *) PySet_New(PyObject *);
[82] Fix | Delete
PyAPI_FUNC(PyObject *) PyFrozenSet_New(PyObject *);
[83] Fix | Delete
PyAPI_FUNC(Py_ssize_t) PySet_Size(PyObject *anyset);
[84] Fix | Delete
#define PySet_GET_SIZE(so) (((PySetObject *)(so))->used)
[85] Fix | Delete
PyAPI_FUNC(int) PySet_Clear(PyObject *set);
[86] Fix | Delete
PyAPI_FUNC(int) PySet_Contains(PyObject *anyset, PyObject *key);
[87] Fix | Delete
PyAPI_FUNC(int) PySet_Discard(PyObject *set, PyObject *key);
[88] Fix | Delete
PyAPI_FUNC(int) PySet_Add(PyObject *set, PyObject *key);
[89] Fix | Delete
PyAPI_FUNC(int) _PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **key);
[90] Fix | Delete
PyAPI_FUNC(int) _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, long *hash);
[91] Fix | Delete
PyAPI_FUNC(PyObject *) PySet_Pop(PyObject *set);
[92] Fix | Delete
PyAPI_FUNC(int) _PySet_Update(PyObject *set, PyObject *iterable);
[93] Fix | Delete
PyAPI_FUNC(void) _PySet_DebugMallocStats(FILE *out);
[94] Fix | Delete
[95] Fix | Delete
#ifdef __cplusplus
[96] Fix | Delete
}
[97] Fix | Delete
#endif
[98] Fix | Delete
#endif /* !Py_SETOBJECT_H */
[99] Fix | Delete
[100] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function