diff options
author | Raymond Hettinger <python@rcn.com> | 2003-11-17 16:42:33 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-11-17 16:42:33 (GMT) |
commit | 50a4bb325c29e7ac2e4727787cb5a40f995ea204 (patch) | |
tree | 240ba663fb4d87bd8b8d951cf97f08ddc74c2785 /Include/setobject.h | |
parent | e2c277a69f86480ce950399a2e8a215a48ee60cd (diff) | |
download | cpython-50a4bb325c29e7ac2e4727787cb5a40f995ea204.zip cpython-50a4bb325c29e7ac2e4727787cb5a40f995ea204.tar.gz cpython-50a4bb325c29e7ac2e4727787cb5a40f995ea204.tar.bz2 |
Various fixups (most suggested by Armin Rigo).
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 |