31#define SPA_DICT_ITEM_INIT(key,value) ((struct spa_dict_item) { (key), (value) })
34#define SPA_DICT_FLAG_SORTED (1<<0)
40#define SPA_DICT_INIT(items,n_items) ((struct spa_dict) { 0, (n_items), (items) })
41#define SPA_DICT_INIT_ARRAY(items) ((struct spa_dict) { 0, SPA_N_ELEMENTS(items), (items) })
43#define spa_dict_for_each(item, dict) \
44 for ((item) = (dict)->items; \
45 (item) < &(dict)->items[(dict)->n_items]; \
52 return strcmp(it1->
key, it2->key);
79 if (!strcmp(item->
key,
key))
89 return item ? item->
value : NULL;
#define SPA_DICT_ITEM_INIT(key, value)
Definition dict.h:37
static void spa_dict_qsort(struct spa_dict *dict)
Definition dict.h:64
static int spa_dict_item_compare(const void *i1, const void *i2)
Definition dict.h:57
static const struct spa_dict_item * spa_dict_lookup_item(const struct spa_dict *dict, const char *key)
Definition dict.h:72
static const char * spa_dict_lookup(const struct spa_dict *dict, const char *key)
Definition dict.h:95
#define SPA_DICT_FLAG_SORTED
items are sorted
Definition dict.h:41
#define spa_dict_for_each(item, dict)
Definition dict.h:52
#define SPA_FLAG_SET(field, flag)
Definition defs.h:79
#define SPA_FLAG_IS_SET(field, flag)
Definition defs.h:76
const char * key
Definition dict.h:32
const char * value
Definition dict.h:33
const struct spa_dict_item * items
Definition dict.h:44
uint32_t n_items
Definition dict.h:43
uint32_t flags
Definition dict.h:42