22 #define PySet_MINSIZE 8
69 #define PyFrozenSet_CheckExact(ob) (Py_TYPE(ob) == &PyFrozenSet_Type)
70 #define PyAnySet_CheckExact(ob) \
71 (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type)
72 #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))
76 #define PySet_Check(ob) \
77 (Py_TYPE(ob) == &PySet_Type || \
78 PyType_IsSubtype(Py_TYPE(ob), &PySet_Type))
79 #define PyFrozenSet_Check(ob) \
80 (Py_TYPE(ob) == &PyFrozenSet_Type || \
81 PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
84 PyAPI_FUNC(PyObject *) PyFrozenSet_New(PyObject *);
86 #define PySet_GET_SIZE(so) (((PySetObject *)(so))->used)
89 PyAPI_FUNC(
int) PySet_Discard(PyObject *set, PyObject *key);
90 PyAPI_FUNC(
int) PySet_Add(PyObject *set, PyObject *key);
93 PyAPI_FUNC(PyObject *) PySet_Pop(PyObject *set);