chttpclient · Section 3
chttpcli_declare_scoped
NAME
chttpcli_declare_scoped - declare a scoped chttpcli handle variable
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/chttpclient.h> chttpcli_declare_scoped(name)
DESCRIPTION
This macro declares a chttpcli variable called name with the GCC cleanup attribute, so the handle is destroyed automatically when name goes out of scope, whichever path leaves the scope. The cleanup destroys it the same way chttpcli_destroy does. The variable starts as CHTTPCLI_NULL. To skip the cleanup call, set it back to CHTTPCLI_NULL before the scope ends.