forked from external/yambar
yml: add TODO to handle duplicate keys when merging dictionaries
This commit is contained in:
parent
91fa8a0217
commit
2977af835c
1 changed files with 10 additions and 0 deletions
10
yml.c
10
yml.c
|
@ -211,6 +211,11 @@ post_process(struct yml_node *node)
|
|||
.key = vv_it->item.key,
|
||||
.value = vv_it->item.value,
|
||||
};
|
||||
/* TODO: handle this. Is it an error? Or
|
||||
* should we replace the existing key/value
|
||||
* pair */
|
||||
assert(!dict_has_key(node, vv_it->item.key));
|
||||
|
||||
tll_push_back(node->dict.pairs, p);
|
||||
}
|
||||
|
||||
|
@ -232,6 +237,11 @@ post_process(struct yml_node *node)
|
|||
.key = v_it->item.key,
|
||||
.value = v_it->item.value,
|
||||
};
|
||||
|
||||
/* TODO: handle this. Is it an error? Or should we
|
||||
* replace the existing key/value pair */
|
||||
assert(!dict_has_key(node, v_it->item.key));
|
||||
|
||||
tll_push_back(node->dict.pairs, p);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue