diff options
Diffstat (limited to 'include/plist/plist.h')
| -rw-r--r-- | include/plist/plist.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h index ace86f8..e817b4b 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h | |||
| @@ -664,6 +664,20 @@ extern "C" | |||
| 664 | */ | 664 | */ |
| 665 | char plist_compare_node_value(plist_t node_l, plist_t node_r); | 665 | char plist_compare_node_value(plist_t node_l, plist_t node_r); |
| 666 | 666 | ||
| 667 | #define _PLIST_IS_TYPE(__plist, __plist_type) (__plist && (plist_get_node_type(__plist) == PLIST_##__plist_type)) | ||
| 668 | |||
| 669 | /* Helper macros for the different plist types */ | ||
| 670 | #define PLIST_IS_BOOLEAN(__plist) _PLIST_IS_TYPE(__plist, BOOLEAN) | ||
| 671 | #define PLIST_IS_UINT(__plist) _PLIST_IS_TYPE(__plist, UINT) | ||
| 672 | #define PLIST_IS_REAL(__plist) _PLIST_IS_TYPE(__plist, REAL) | ||
| 673 | #define PLIST_IS_STRING(__plist) _PLIST_IS_TYPE(__plist, STRING) | ||
| 674 | #define PLIST_IS_ARRAY(__plist) _PLIST_IS_TYPE(__plist, ARRAY) | ||
| 675 | #define PLIST_IS_DICT(__plist) _PLIST_IS_TYPE(__plist, DICT) | ||
| 676 | #define PLIST_IS_DATE(__plist) _PLIST_IS_TYPE(__plist, DATE) | ||
| 677 | #define PLIST_IS_DATA(__plist) _PLIST_IS_TYPE(__plist, DATA) | ||
| 678 | #define PLIST_IS_KEY(__plist) _PLIST_IS_TYPE(__plist, KEY) | ||
| 679 | #define PLIST_IS_UID(__plist) _PLIST_IS_TYPE(__plist, UID) | ||
| 680 | |||
| 667 | /*@}*/ | 681 | /*@}*/ |
| 668 | 682 | ||
| 669 | #ifdef __cplusplus | 683 | #ifdef __cplusplus |
