summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-03-19 02:26:09 +0100
committerGravatar Nikias Bassen2014-03-19 02:26:09 +0100
commitf9299fa80a7530fea4b829ea851972a664edf1fe (patch)
tree94cf6141a7ef3c4661f05d33cb26e05d6e1b2410 /include
parent6dcc8c48bb372ad372ffb1848bd24c6b416fd16e (diff)
downloadlibplist-f9299fa80a7530fea4b829ea851972a664edf1fe.tar.gz
libplist-f9299fa80a7530fea4b829ea851972a664edf1fe.tar.bz2
plist_dict_set_item: insert key/value pair if key not already present
Diffstat (limited to 'include')
-rw-r--r--include/plist/plist.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h
index 41588a8..b482199 100644
--- a/include/plist/plist.h
+++ b/include/plist/plist.h
@@ -310,20 +310,21 @@ extern "C"
/**
* Set item identified by key in a #PLIST_DICT node.
- * The previous item at index n will be freed using #plist_free
+ * The previous item identified by key will be freed using #plist_free.
+ * If there is no item for the given key a new item will be inserted.
*
* @param node the node of type #PLIST_DICT
* @param item the new item associated to key
- * @param key the identifier of the item to get. Assert if identifier is not present.
+ * @param key the identifier of the item to set.
*/
PLIST_API void plist_dict_set_item(plist_t node, const char* key, plist_t item);
/**
- * Insert a new item at position n in a #PLIST_DICT node.
+ * Insert a new item into a #PLIST_DICT node.
*
* @param node the node of type #PLIST_DICT
* @param item the new item to insert
- * @param key The identifier of the item to insert. Assert if identifier already present.
+ * @param key The identifier of the item to insert.
*/
PLIST_API void plist_dict_insert_item(plist_t node, const char* key, plist_t item);