cyaml · Section 3
cyaml_create_list_mp, cyaml_create_list
NAME
cyaml_create_list_mp, cyaml_create_list - allocate an empty YAML list node
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cyaml.h> cyaml cyaml_create_list_mp(ccol_memmgmt_procs *mp); cyaml cyaml_create_list(void);
DESCRIPTION
Allocates a DOM node of type CYAML_LIST, whose elements live in a cvector. The list starts empty, and you add children to it with cyaml_list_push(). cyaml_create_list() passes NULL for mp.
PARAMETERS
mp Custom allocator, or NULL for the default.
The library keeps its own copy of the struct, so the caller may
release or reuse the struct once this call returns. The
functions that it names must stay callable until the last node
built with them is destroyed. A process can use at most 64
distinct sets of four functions, and a call that would need a
65th fails and returns NULL.
RETURN VALUE
A new cyaml node on success, NULL when the allocation fails.
SEE ALSO
cyaml_list_push(3), cyaml_list_get(3), cyaml_list_size(3), cyaml_destroy(3)