chttpclient · Section 3
chttpcli_construct_scoped
NAME
chttpcli_construct_scoped - declare and initialize a chttpcli handle that the library destroys automatically
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/chttpclient.h> chttpcli_construct_scoped(name)
DESCRIPTION
This macro is chttpcli_declare_scoped followed by chttpcli_create. It declares name with the GCC cleanup attribute, calls chttpcli_create and stores the result in name, so the client is destroyed automatically when name leaves the scope. If the creation fails, the macro calls ccol__fatal_err() and does not return.
PARAMETERS
name The identifier of the new handle variable.