summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-11-17 16:42:33 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-11-17 16:42:33 (GMT)
commit50a4bb325c29e7ac2e4727787cb5a40f995ea204 (patch)
tree240ba663fb4d87bd8b8d951cf97f08ddc74c2785 /Include
parente2c277a69f86480ce950399a2e8a215a48ee60cd (diff)
downloadcpython-50a4bb325c29e7ac2e4727787cb5a40f995ea204.zip
cpython-50a4bb325c29e7ac2e4727787cb5a40f995ea204.tar.gz
cpython-50a4bb325c29e7ac2e4727787cb5a40f995ea204.tar.bz2
Various fixups (most suggested by Armin Rigo).
Diffstat (limited to 'Include')
-rw-r--r--Include/setobject.h6
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