cyaml · Section 3
cyaml_create_int_mp, cyaml_create_int
NAME
cyaml_create_int_mp, cyaml_create_int - allocate a YAML integer node
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cyaml.h> cyaml cyaml_create_int_mp(long long val, ccol_memmgmt_procs *mp); cyaml cyaml_create_int(long long val);
DESCRIPTION
Allocates a DOM node of type CYAML_INTEGER, which stores the value as a long long. cyaml_create_int() passes NULL for mp.
PARAMETERS
val The integer value. Whatever integer type the caller passes is
converted implicitly to long long.
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.