libplist  2.8.0
API Documentation - Return to Homepage

◆ plist_array_append_item()

PLIST_API plist_err_t plist_array_append_item ( plist_t node,
plist_t item )

Append a new item at the end of a PLIST_ARRAY node.

Parameters
nodethe node of type PLIST_ARRAY
itemthe new item. The array is responsible for freeing item when it is no longer needed.
Returns
  • PLIST_ERR_SUCCESS on success.
  • PLIST_ERR_INVALID_ARG if node is not an array, item is NULL, or item is already attached to a parent.
  • PLIST_ERR_NO_MEM if memory allocation failed while appending the item.
  • PLIST_ERR_UNKNOWN if an unexpected internal error occurred.