18.2.216. PMIx_Regex2_construct
PMIx_Regex2_construct — Initialize a caller-provided
pmix_regex2_t(5) structure.
18.2.216.1. SYNOPSIS
#include <pmix.h>
void PMIx_Regex2_construct(pmix_regex2_t *d);
18.2.216.1.1. Python Syntax
No Python equivalent
18.2.216.2. INPUT PARAMETERS
d: Pointer to thepmix_regex2_tstructure 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.216.3. DESCRIPTION
Initialize the fields of a pmix_regex2_t that the caller has already
allocated. A pmix_regex2_t describes a PMIx encoded regular expression and
carries three fields:
type— a colon-delimited identifier of the encoding method (for example"pmix"or"blob");bytes— the encoded representation, which may not beNULL-terminated;len— the number of bytes in the encoded representation.
Construction sets the type and bytes pointers to NULL and len
to zero. No heap memory is allocated.
Because PMIx_Regex2_construct operates on caller-provided storage, it must
be paired with PMIx_Regex2_destruct(3) to
release any payload the structure subsequently acquires. Do not pass a
constructed (as opposed to created) structure to PMIx_Regex2_free(3), as that would attempt to free storage the library did
not allocate.
18.2.216.4. RETURN VALUE
PMIx_Regex2_construct returns no value (void).
18.2.216.5. NOTES
PMIx_Regex2_construct is an OpenPMIx convenience routine. The equivalent
static initializer PMIX_REGEX2_STATIC_INIT may be used where a compile-time
initialization is preferred.
18.2.216.6. EXAMPLES
Construct a structure:
pmix_regex2_t rex;
PMIx_Regex2_construct(&rex);