table of contents
- unstable 7.0.0~rc1-1
| PMIX_ENVAR_CONSTRUCT(3) | OpenPMIx | PMIX_ENVAR_CONSTRUCT(3) |
PMIx_Envar_construct — Initialize a caller-provided pmix_envar_t(5) <#man5-pmix-envar-t> structure.
SYNOPSIS¶
#include <pmix.h> void PMIx_Envar_construct(pmix_envar_t *e);
Python Syntax¶
No Python equivalent
INPUT PARAMETERS¶
- •
- e: Pointer to the pmix_envar_t(5) <#man5-pmix-envar-t> 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).
DESCRIPTION¶
Initialize the fields of a pmix_envar_t <#man5-pmix-envar-t> that the caller has already allocated. The envar and value string pointers are set to NULL and the separator character is set to '\0'. No heap memory is allocated.
A structure must be constructed (or created with PMIx_Envar_create(3) <#man3-pmix-envar-create>) before its contents are populated — for example with PMIx_Envar_load(3) <#man3-pmix-envar-load> — or used in any operation.
Because PMIx_Envar_construct operates on caller-provided storage, it must be paired with PMIx_Envar_destruct(3) <#man3-pmix-envar-destruct> to release any strings the structure subsequently acquires. Do not pass a constructed (as opposed to created) structure to PMIx_Envar_free(3) <#man3-pmix-envar-free>, as that would attempt to free storage the library did not allocate.
RETURN VALUE¶
PMIx_Envar_construct returns no value (void).
NOTES¶
PMIx_Envar_construct is an OpenPMIx convenience routine. The equivalent static initializer PMIX_ENVAR_STATIC_INIT may be used where a compile-time initialization is preferred.
EXAMPLES¶
Construct a structure:
pmix_envar_t envar; PMIx_Envar_construct(&envar);
See also:
Copyright¶
2014-2026, OpenPMIx Community
| September 27, 2026 |