C Collections

chttpserver · Section 3

chttpsvr_declare_scoped

chttpsvr_declare_scoped - declare a chttpsvr variable with automatic destruction

C Collections (libccollections, -lccollections)

#include <ccollections/chttpserver.h>
 
chttpsvr_declare_scoped(name);

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.

chttpsvr_construct_scoped(3), chttpsvr_declare(3)