Set item identified by key in a PLIST_DICT node.
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.
- Parameters
-
| node | the node of type PLIST_DICT |
| item | the new item associated to key |
| key | the identifier of the item to set. |
- Returns
- PLIST_ERR_SUCCESS on success.
- PLIST_ERR_INVALID_ARG if node is not a dictionary, key is NULL, item is NULL, or item is already attached to a parent.
- PLIST_ERR_NO_MEM if memory allocation failed while creating or inserting the key/value pair.
- PLIST_ERR_UNKNOWN if an unexpected internal error occurred.