Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/python3....
File: dictobject.h
#ifndef Py_DICTOBJECT_H
[0] Fix | Delete
#define Py_DICTOBJECT_H
[1] Fix | Delete
#ifdef __cplusplus
[2] Fix | Delete
extern "C" {
[3] Fix | Delete
#endif
[4] Fix | Delete
[5] Fix | Delete
[6] Fix | Delete
/* Dictionary object type -- mapping from hashable object to object */
[7] Fix | Delete
[8] Fix | Delete
/* The distribution includes a separate file, Objects/dictnotes.txt,
[9] Fix | Delete
describing explorations into dictionary design and optimization.
[10] Fix | Delete
It covers typical dictionary use patterns, the parameters for
[11] Fix | Delete
tuning dictionaries, and several ideas for possible optimizations.
[12] Fix | Delete
*/
[13] Fix | Delete
[14] Fix | Delete
#ifndef Py_LIMITED_API
[15] Fix | Delete
[16] Fix | Delete
typedef struct _dictkeysobject PyDictKeysObject;
[17] Fix | Delete
[18] Fix | Delete
/* The ma_values pointer is NULL for a combined table
[19] Fix | Delete
* or points to an array of PyObject* for a split table
[20] Fix | Delete
*/
[21] Fix | Delete
typedef struct {
[22] Fix | Delete
PyObject_HEAD
[23] Fix | Delete
[24] Fix | Delete
/* Number of items in the dictionary */
[25] Fix | Delete
Py_ssize_t ma_used;
[26] Fix | Delete
[27] Fix | Delete
/* Dictionary version: globally unique, value change each time
[28] Fix | Delete
the dictionary is modified */
[29] Fix | Delete
uint64_t ma_version_tag;
[30] Fix | Delete
[31] Fix | Delete
PyDictKeysObject *ma_keys;
[32] Fix | Delete
[33] Fix | Delete
/* If ma_values is NULL, the table is "combined": keys and values
[34] Fix | Delete
are stored in ma_keys.
[35] Fix | Delete
[36] Fix | Delete
If ma_values is not NULL, the table is splitted:
[37] Fix | Delete
keys are stored in ma_keys and values are stored in ma_values */
[38] Fix | Delete
PyObject **ma_values;
[39] Fix | Delete
} PyDictObject;
[40] Fix | Delete
[41] Fix | Delete
typedef struct {
[42] Fix | Delete
PyObject_HEAD
[43] Fix | Delete
PyDictObject *dv_dict;
[44] Fix | Delete
} _PyDictViewObject;
[45] Fix | Delete
[46] Fix | Delete
#endif /* Py_LIMITED_API */
[47] Fix | Delete
[48] Fix | Delete
PyAPI_DATA(PyTypeObject) PyDict_Type;
[49] Fix | Delete
PyAPI_DATA(PyTypeObject) PyDictIterKey_Type;
[50] Fix | Delete
PyAPI_DATA(PyTypeObject) PyDictIterValue_Type;
[51] Fix | Delete
PyAPI_DATA(PyTypeObject) PyDictIterItem_Type;
[52] Fix | Delete
PyAPI_DATA(PyTypeObject) PyDictKeys_Type;
[53] Fix | Delete
PyAPI_DATA(PyTypeObject) PyDictItems_Type;
[54] Fix | Delete
PyAPI_DATA(PyTypeObject) PyDictValues_Type;
[55] Fix | Delete
[56] Fix | Delete
#define PyDict_Check(op) \
[57] Fix | Delete
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_DICT_SUBCLASS)
[58] Fix | Delete
#define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
[59] Fix | Delete
#define PyDictKeys_Check(op) PyObject_TypeCheck(op, &PyDictKeys_Type)
[60] Fix | Delete
#define PyDictItems_Check(op) PyObject_TypeCheck(op, &PyDictItems_Type)
[61] Fix | Delete
#define PyDictValues_Check(op) PyObject_TypeCheck(op, &PyDictValues_Type)
[62] Fix | Delete
/* This excludes Values, since they are not sets. */
[63] Fix | Delete
# define PyDictViewSet_Check(op) \
[64] Fix | Delete
(PyDictKeys_Check(op) || PyDictItems_Check(op))
[65] Fix | Delete
[66] Fix | Delete
[67] Fix | Delete
PyAPI_FUNC(PyObject *) PyDict_New(void);
[68] Fix | Delete
PyAPI_FUNC(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key);
[69] Fix | Delete
#ifndef Py_LIMITED_API
[70] Fix | Delete
PyAPI_FUNC(PyObject *) _PyDict_GetItem_KnownHash(PyObject *mp, PyObject *key,
[71] Fix | Delete
Py_hash_t hash);
[72] Fix | Delete
#endif
[73] Fix | Delete
PyAPI_FUNC(PyObject *) PyDict_GetItemWithError(PyObject *mp, PyObject *key);
[74] Fix | Delete
#ifndef Py_LIMITED_API
[75] Fix | Delete
PyAPI_FUNC(PyObject *) _PyDict_GetItemIdWithError(PyObject *dp,
[76] Fix | Delete
struct _Py_Identifier *key);
[77] Fix | Delete
PyAPI_FUNC(PyObject *) PyDict_SetDefault(
[78] Fix | Delete
PyObject *mp, PyObject *key, PyObject *defaultobj);
[79] Fix | Delete
#endif
[80] Fix | Delete
PyAPI_FUNC(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item);
[81] Fix | Delete
#ifndef Py_LIMITED_API
[82] Fix | Delete
PyAPI_FUNC(int) _PyDict_SetItem_KnownHash(PyObject *mp, PyObject *key,
[83] Fix | Delete
PyObject *item, Py_hash_t hash);
[84] Fix | Delete
#endif
[85] Fix | Delete
PyAPI_FUNC(int) PyDict_DelItem(PyObject *mp, PyObject *key);
[86] Fix | Delete
#ifndef Py_LIMITED_API
[87] Fix | Delete
PyAPI_FUNC(int) _PyDict_DelItem_KnownHash(PyObject *mp, PyObject *key,
[88] Fix | Delete
Py_hash_t hash);
[89] Fix | Delete
PyAPI_FUNC(int) _PyDict_DelItemIf(PyObject *mp, PyObject *key,
[90] Fix | Delete
int (*predicate)(PyObject *value));
[91] Fix | Delete
#endif
[92] Fix | Delete
PyAPI_FUNC(void) PyDict_Clear(PyObject *mp);
[93] Fix | Delete
PyAPI_FUNC(int) PyDict_Next(
[94] Fix | Delete
PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value);
[95] Fix | Delete
#ifndef Py_LIMITED_API
[96] Fix | Delete
PyDictKeysObject *_PyDict_NewKeysForClass(void);
[97] Fix | Delete
PyAPI_FUNC(PyObject *) PyObject_GenericGetDict(PyObject *, void *);
[98] Fix | Delete
PyAPI_FUNC(int) _PyDict_Next(
[99] Fix | Delete
PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, Py_hash_t *hash);
[100] Fix | Delete
PyObject *_PyDictView_New(PyObject *, PyTypeObject *);
[101] Fix | Delete
#endif
[102] Fix | Delete
PyAPI_FUNC(PyObject *) PyDict_Keys(PyObject *mp);
[103] Fix | Delete
PyAPI_FUNC(PyObject *) PyDict_Values(PyObject *mp);
[104] Fix | Delete
PyAPI_FUNC(PyObject *) PyDict_Items(PyObject *mp);
[105] Fix | Delete
PyAPI_FUNC(Py_ssize_t) PyDict_Size(PyObject *mp);
[106] Fix | Delete
PyAPI_FUNC(PyObject *) PyDict_Copy(PyObject *mp);
[107] Fix | Delete
PyAPI_FUNC(int) PyDict_Contains(PyObject *mp, PyObject *key);
[108] Fix | Delete
#ifndef Py_LIMITED_API
[109] Fix | Delete
PyAPI_FUNC(int) _PyDict_Contains(PyObject *mp, PyObject *key, Py_hash_t hash);
[110] Fix | Delete
PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused);
[111] Fix | Delete
PyAPI_FUNC(void) _PyDict_MaybeUntrack(PyObject *mp);
[112] Fix | Delete
PyAPI_FUNC(int) _PyDict_HasOnlyStringKeys(PyObject *mp);
[113] Fix | Delete
Py_ssize_t _PyDict_KeysSize(PyDictKeysObject *keys);
[114] Fix | Delete
Py_ssize_t _PyDict_SizeOf(PyDictObject *);
[115] Fix | Delete
PyAPI_FUNC(PyObject *) _PyDict_Pop(PyObject *, PyObject *, PyObject *);
[116] Fix | Delete
PyObject *_PyDict_Pop_KnownHash(PyObject *, PyObject *, Py_hash_t, PyObject *);
[117] Fix | Delete
PyObject *_PyDict_FromKeys(PyObject *, PyObject *, PyObject *);
[118] Fix | Delete
#define _PyDict_HasSplitTable(d) ((d)->ma_values != NULL)
[119] Fix | Delete
[120] Fix | Delete
PyAPI_FUNC(int) PyDict_ClearFreeList(void);
[121] Fix | Delete
#endif
[122] Fix | Delete
[123] Fix | Delete
/* PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1). */
[124] Fix | Delete
PyAPI_FUNC(int) PyDict_Update(PyObject *mp, PyObject *other);
[125] Fix | Delete
[126] Fix | Delete
/* PyDict_Merge updates/merges from a mapping object (an object that
[127] Fix | Delete
supports PyMapping_Keys() and PyObject_GetItem()). If override is true,
[128] Fix | Delete
the last occurrence of a key wins, else the first. The Python
[129] Fix | Delete
dict.update(other) is equivalent to PyDict_Merge(dict, other, 1).
[130] Fix | Delete
*/
[131] Fix | Delete
PyAPI_FUNC(int) PyDict_Merge(PyObject *mp,
[132] Fix | Delete
PyObject *other,
[133] Fix | Delete
int override);
[134] Fix | Delete
[135] Fix | Delete
#ifndef Py_LIMITED_API
[136] Fix | Delete
/* Like PyDict_Merge, but override can be 0, 1 or 2. If override is 0,
[137] Fix | Delete
the first occurrence of a key wins, if override is 1, the last occurrence
[138] Fix | Delete
of a key wins, if override is 2, a KeyError with conflicting key as
[139] Fix | Delete
argument is raised.
[140] Fix | Delete
*/
[141] Fix | Delete
PyAPI_FUNC(int) _PyDict_MergeEx(PyObject *mp, PyObject *other, int override);
[142] Fix | Delete
PyAPI_FUNC(PyObject *) _PyDictView_Intersect(PyObject* self, PyObject *other);
[143] Fix | Delete
#endif
[144] Fix | Delete
[145] Fix | Delete
/* PyDict_MergeFromSeq2 updates/merges from an iterable object producing
[146] Fix | Delete
iterable objects of length 2. If override is true, the last occurrence
[147] Fix | Delete
of a key wins, else the first. The Python dict constructor dict(seq2)
[148] Fix | Delete
is equivalent to dict={}; PyDict_MergeFromSeq(dict, seq2, 1).
[149] Fix | Delete
*/
[150] Fix | Delete
PyAPI_FUNC(int) PyDict_MergeFromSeq2(PyObject *d,
[151] Fix | Delete
PyObject *seq2,
[152] Fix | Delete
int override);
[153] Fix | Delete
[154] Fix | Delete
PyAPI_FUNC(PyObject *) PyDict_GetItemString(PyObject *dp, const char *key);
[155] Fix | Delete
#ifndef Py_LIMITED_API
[156] Fix | Delete
PyAPI_FUNC(PyObject *) _PyDict_GetItemId(PyObject *dp, struct _Py_Identifier *key);
[157] Fix | Delete
#endif /* !Py_LIMITED_API */
[158] Fix | Delete
PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
[159] Fix | Delete
#ifndef Py_LIMITED_API
[160] Fix | Delete
PyAPI_FUNC(int) _PyDict_SetItemId(PyObject *dp, struct _Py_Identifier *key, PyObject *item);
[161] Fix | Delete
#endif /* !Py_LIMITED_API */
[162] Fix | Delete
PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, const char *key);
[163] Fix | Delete
[164] Fix | Delete
#ifndef Py_LIMITED_API
[165] Fix | Delete
PyAPI_FUNC(int) _PyDict_DelItemId(PyObject *mp, struct _Py_Identifier *key);
[166] Fix | Delete
PyAPI_FUNC(void) _PyDict_DebugMallocStats(FILE *out);
[167] Fix | Delete
[168] Fix | Delete
int _PyObjectDict_SetItem(PyTypeObject *tp, PyObject **dictptr, PyObject *name, PyObject *value);
[169] Fix | Delete
PyObject *_PyDict_LoadGlobal(PyDictObject *, PyDictObject *, PyObject *);
[170] Fix | Delete
#endif
[171] Fix | Delete
[172] Fix | Delete
#ifdef __cplusplus
[173] Fix | Delete
}
[174] Fix | Delete
#endif
[175] Fix | Delete
#endif /* !Py_DICTOBJECT_H */
[176] Fix | Delete
[177] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function