Various fixups (most suggested by Armin Rigo).

This commit is contained in:
Raymond Hettinger 2003-11-17 16:42:33 +00:00
parent e2c277a69f
commit 50a4bb325c
3 changed files with 97 additions and 40 deletions

View file

@ -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