18.2.203. PMIx_Endpoint_construct
PMIx_Endpoint_construct — Initialize a caller-provided
pmix_endpoint_t(5) structure.
18.2.203.1. SYNOPSIS
#include <pmix.h>
void PMIx_Endpoint_construct(pmix_endpoint_t *e);
18.2.203.1.1. Python Syntax
No Python equivalent
18.2.203.2. INPUT PARAMETERS
e: Pointer to the pmix_endpoint_t(5) structure to be initialized. The storage for the structure itself must already exist — it is supplied by the caller (typically declared on the stack or embedded within another object).
18.2.203.3. DESCRIPTION
Initialize the memory of a pmix_endpoint_t that
the caller has already allocated. The function zeroes the entire structure,
clearing the uuid and osname string pointers and the embedded
endpt byte object (its bytes pointer and size). No heap memory is
allocated.
A structure must be constructed (or created with PMIx_Endpoint_create(3)) before any of its fields are used; operating on an uninitialized structure produces undefined behavior.
Because PMIx_Endpoint_construct operates on caller-provided storage, it
must be paired with
PMIx_Endpoint_destruct(3) to release any
uuid, osname, or endpt payload the structure subsequently
acquires. Do not pass a constructed (as opposed to created) structure to
PMIx_Endpoint_free(3), as that would attempt
to free storage the library did not allocate.
18.2.203.4. RETURN VALUE
PMIx_Endpoint_construct returns no value (void).
18.2.203.5. EXAMPLES
Construct a structure:
pmix_endpoint_t ep;
PMIx_Endpoint_construct(&ep);