C Collections

cyaml · Section 3

cyaml_declare

cyaml_declare - declare an uninitialized cyaml variable

C Collections (libccollections, -lccollections)

#include <ccollections/cyaml.h>
 
cyaml_declare(var_name);

Declares a cyaml handle named var_name and leaves it uninitialized.
The macro is there so that cyaml follows the naming convention of the
other c_collections modules, which all have a _declare macro.
 
It expands to "cyaml var_name".

var_name  Name of the variable to declare.

cyaml_declare(root);
root = cyaml_parse("key: value\n", NULL);
/* ... use root ... */
cyaml_destroy(root);

cyaml_declare_scoped(3), cyaml_destroy(3)