Warning, file /include/python3.12/cpython/setobject.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef Py_CPYTHON_SETOBJECT_H
0002 # error "this header file must not be included directly"
0003 #endif
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #define PySet_MINSIZE 8
0019
0020 typedef struct {
0021 PyObject *key;
0022 Py_hash_t hash;
0023 } setentry;
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 typedef struct {
0037 PyObject_HEAD
0038
0039 Py_ssize_t fill;
0040 Py_ssize_t used;
0041
0042
0043
0044
0045
0046 Py_ssize_t mask;
0047
0048
0049
0050
0051
0052
0053 setentry *table;
0054 Py_hash_t hash;
0055 Py_ssize_t finger;
0056
0057 setentry smalltable[PySet_MINSIZE];
0058 PyObject *weakreflist;
0059 } PySetObject;
0060
0061 #define _PySet_CAST(so) \
0062 (assert(PyAnySet_Check(so)), _Py_CAST(PySetObject*, so))
0063
0064 static inline Py_ssize_t PySet_GET_SIZE(PyObject *so) {
0065 return _PySet_CAST(so)->used;
0066 }
0067 #define PySet_GET_SIZE(so) PySet_GET_SIZE(_PyObject_CAST(so))
0068
0069 PyAPI_DATA(PyObject *) _PySet_Dummy;
0070
0071 PyAPI_FUNC(int) _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, Py_hash_t *hash);
0072 PyAPI_FUNC(int) _PySet_Update(PyObject *set, PyObject *iterable);