C Collections

cstring · Section 3

cstr_construct_mp

cstr_construct_mp - declare and initialise a cstr with custom memory management

C Collections (libccollections, -lccollections)

#include <ccollections/cstring.h>
 
cstr_construct_mp(s, initial, mprocs);

This macro does cstr_declare() and cstr_init_mp() in one statement, so
you get a cstr that uses the custom memory management procedures you
pass.

s        Variable name to create
initial  Initial content (C string or NULL for empty string)
mprocs   Custom memory management procedures (ccol_memmgmt_procs *)

cstr_construct(3), cstr_construct_mp_scoped(3), cstr_init_mp(3)