51#define SPA_DICT_ITEM_INIT(key,value) ((struct spa_dict_item) { (key), (value) })
54#define SPA_DICT_FLAG_SORTED (1<<0)
60#define SPA_DICT_INIT(items,n_items) ((struct spa_dict) { 0, (n_items), (items) })
61#define SPA_DICT_INIT_ARRAY(items) ((struct spa_dict) { 0, SPA_N_ELEMENTS(items), (items) })
63#define spa_dict_for_each(item, dict) \
64 for ((item) = (dict)->items; \
65 (item) < &(dict)->items[(dict)->n_items]; \
72 return strcmp(it1->
key, it2->key);
99 if (!strcmp(item->
key,
key))
109 return item ? item->
value : NULL;
#define SPA_DICT_ITEM_INIT(key, value)
Definition: utils/dict.h:57
static void spa_dict_qsort(struct spa_dict *dict)
Definition: utils/dict.h:84
static int spa_dict_item_compare(const void *i1, const void *i2)
Definition: utils/dict.h:77
static const struct spa_dict_item * spa_dict_lookup_item(const struct spa_dict *dict, const char *key)
Definition: utils/dict.h:92
static const char * spa_dict_lookup(const struct spa_dict *dict, const char *key)
Definition: utils/dict.h:115
#define SPA_DICT_FLAG_SORTED
items are sorted
Definition: utils/dict.h:61
#define spa_dict_for_each(item, dict)
Definition: utils/dict.h:72
#define SPA_FLAG_SET(field, flag)
Definition: defs.h:95
#define SPA_FLAG_IS_SET(field, flag)
Definition: defs.h:92
Definition: utils/dict.h:51
const char * key
Definition: utils/dict.h:52
const char * value
Definition: utils/dict.h:53
Definition: utils/dict.h:59
const struct spa_dict_item * items
Definition: utils/dict.h:64
uint32_t n_items
Definition: utils/dict.h:63
uint32_t flags
Definition: utils/dict.h:62