18.2.174. PMIx_Byte_object_construct

PMIx_Byte_object_construct — Initialize a caller-provided pmix_byte_object_t(5) structure.

18.2.174.1. SYNOPSIS

#include <pmix.h>

void PMIx_Byte_object_construct(pmix_byte_object_t *b);

18.2.174.1.1. Python Syntax

No Python equivalent

18.2.174.2. INPUT PARAMETERS

  • b: Pointer to the pmix_byte_object_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.174.3. DESCRIPTION

Initialize the fields of a pmix_byte_object_t that the caller has already allocated. The function sets the bytes pointer to NULL and the size field to zero. No heap memory is allocated and no payload is attached.

18.2.174.4. RETURN VALUE

PMIx_Byte_object_construct returns no value (void).

18.2.174.5. NOTES

Because PMIx_Byte_object_construct operates on caller-provided storage, it must be paired with PMIx_Byte_object_destruct(3) to release any payload the object subsequently acquires. Do not pass a constructed (as opposed to created) object to PMIx_Byte_object_free(3), as that would attempt to free storage the library did not allocate.

The convenience macro PMIX_BYTE_OBJECT_CONSTRUCT is provided as a direct wrapper around this function.

18.2.174.6. EXAMPLES

Construct a structure:

pmix_byte_object_t bo;

PMIx_Byte_object_construct(&bo);