C Collections

cyaml · Section 3

cyaml_create_bool_mp, cyaml_create_bool

cyaml_create_bool_mp, cyaml_create_bool - allocate a YAML boolean node

C Collections (libccollections, -lccollections)

#include <ccollections/cyaml.h>
 
cyaml cyaml_create_bool_mp(bool val, ccol_memmgmt_procs *mp);
cyaml cyaml_create_bool(bool val);

Allocates a DOM node of type CYAML_BOOL that holds val.
cyaml_create_bool() passes NULL for mp.

val  The C boolean value.
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.

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

cyaml_bool_val(3), cyaml_destroy(3)