C Collections

cyaml · Section 3

cyaml_serialize_free_mp, cyaml_serialize_free

cyaml_serialize_free_mp, cyaml_serialize_free - free a serializer buffer

C Collections (libccollections, -lccollections)

#include <ccollections/cyaml.h>
 
void cyaml_serialize_free_mp(char *s, ccol_memmgmt_procs *mp);
void cyaml_serialize_free(char *s);

Frees a buffer that cyaml_serialize(), cyaml_serialize_flow() or
cyaml_serialize_stream() returned.  cyaml_serialize_free() is an
inline wrapper that passes NULL for mp.
 
mp must match the allocator that built the DOM tree, which is the mp
the caller gave to cyaml_parse_mp() or to a create function.  Passing
the wrong allocator here is undefined behaviour.

s    The string to free.  It may be NULL, and the function then does
     nothing.
mp   The allocator that frees it, or NULL for the default.

cyaml_serialize(3), cyaml_serialize_flow(3), cyaml_serialize_stream(3)