pdcomm_secs_list
Function
Creates a List item from copies of existing items.
PdcommStatus pdcomm_secs_list(const PdcommSecsItem *const *children, size_t count, const PdcommSecsLimits *options, PdcommSecsItem **out)The aggregate size, item count, and depth of the new List are checked against options before any child is copied. The child handles stay owned by the caller and are not modified.
Parameters
| Name | Description |
|---|---|
children | Array of count live item handles. May be NULL when count is 0, which creates an empty List. No element may be NULL. |
count | Number of children; must be less than options->item_count and at most 16777215. |
options | Limits to enforce; struct_size must be at least sizeof(PdcommSecsLimits). |
out | Receives the new List; NULL after every failure. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when out or options is NULL, options->struct_size is too small, children is NULL with a nonzero count, or a child handle is NULL; #PDCOMM_LIMIT_EXCEEDED when the List or any child exceeds a limit; #PDCOMM_ALLOCATION_FAILED or #PDCOMM_INTERNAL_ERROR.
Notes
- Ownership: release the List with pdcomm_secs_destroy(). Releasing a child handle later does not affect the List.