C Collections

cyaml · Section 3

cyaml_create_null_mp, cyaml_create_null

cyaml_create_null_mp, cyaml_create_null - allocate a YAML null node

C Collections (libccollections, -lccollections)

#include <ccollections/cyaml.h>
 
cyaml cyaml_create_null_mp(ccol_memmgmt_procs *mp);
cyaml cyaml_create_null(void);

Allocates a DOM node of type CYAML_NULL.  cyaml_create_null() is an
inline wrapper that passes NULL to cyaml_create_null_mp(), so it uses
the default allocator.

mp   Custom memory management procedures, or NULL for the default
     allocator.
     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.

A new cyaml node on success, NULL when the allocation fails.

cyaml_destroy(3), cyaml_type(3)