cstring · Section 3
cstr_reserve
NAME
cstr_reserve - reserve capacity, and call ccol__fatal_err() on failure
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cstring.h> cstr_reserve(s, cap);
DESCRIPTION
This macro calls cstring_reserve(), and when that call returns false it calls ccol__fatal_err().
PARAMETERS
s cstr to change cap Minimum number of bytes to reserve (with the null terminator)
NOTES
The macro evaluates cap exactly once, so the failure message reports the capacity that the call really used. If you want to handle an error yourself, call cstring_reserve() directly.