chttpserver · Section 3
chttpsvr_declare_scoped
NAME
chttpsvr_declare_scoped - declare a chttpsvr variable with automatic destruction
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/chttpserver.h> chttpsvr_declare_scoped(name);
DESCRIPTION
Like chttpsvr_declare, but the variable also carries a GCC cleanup attribute. When name goes out of scope the server is destroyed in the same way as chttpsvr_destroy destroys it. The macro sets the variable to CHTTPSVR_NULL, and if name still holds that value at the end of the scope the cleanup does nothing.