C Collections

cstring · Section 3

cstring_get_mprocs

cstring_get_mprocs - get the memory management procedures for a string

C Collections (libccollections, -lccollections)

#include <ccollections/cstring.h>
 
ccol_memmgmt_procs *cstring_get_mprocs(cstr s);

This function returns the custom memory management procedures that the
string was created with, or NULL when the string uses the default
malloc/free allocators.

s   String to query

A pointer to the memory management procedures, or NULL for the defaults

The structure belongs to the library and stays valid until the string is
destroyed. Do not free it yourself, and do not use it after the destroy
Asserts if s is NULL

cstring_create_full(3)