diff options
Diffstat (limited to 'Include/setobject.h')
-rw-r--r-- | Include/setobject.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/setobject.h b/Include/setobject.h index eeffa8a..6289f9c 100644 --- a/Include/setobject.h +++ b/Include/setobject.h @@ -20,6 +20,12 @@ typedef struct { PyAPI_DATA(PyTypeObject) PySet_Type; PyAPI_DATA(PyTypeObject) PyFrozenSet_Type; + +#define PyAnySet_Check(ob) \ + ((ob)->ob_type == &PySet_Type || (ob)->ob_type == &PyFrozenSet_Type || \ + PyType_IsSubtype((ob)->ob_type, &PySet_Type) || \ + PyType_IsSubtype((ob)->ob_type, &PyFrozenSet_Type)) + #ifdef __cplusplus } #endif |