18.2.163. PMIx_Query_construct
PMIx_Query_construct — Initialize a caller-provided
pmix_query_t(5) structure.
18.2.163.1. SYNOPSIS
#include <pmix.h>
void PMIx_Query_construct(pmix_query_t *p);
18.2.163.1.1. Python Syntax
No Python equivalent
18.2.163.2. INPUT PARAMETERS
p: Pointer to the pmix_query_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.163.3. DESCRIPTION
Initialize the memory of a pmix_query_t that the
caller has already allocated. The function zeroes the entire structure,
clearing the keys and qualifiers pointers and setting nqual to
zero. No heap memory is allocated, and no keys or qualifiers are attached.
A query structure must be constructed (or created with PMIx_Query_create(3)) before its fields are populated and it is passed to a query operation such as PMIx_Query_info(3).
Because PMIx_Query_construct operates on caller-provided storage, it must
be paired with PMIx_Query_destruct(3) to
release any keys or qualifiers the structure subsequently acquires. Do
not pass a constructed (as opposed to created) structure to
PMIx_Query_release(3), as that would attempt
to free storage the library did not allocate.
18.2.163.4. RETURN VALUE
PMIx_Query_construct returns no value (void).
18.2.163.5. NOTES
The PMIX_QUERY_CONSTRUCT convenience macro is a direct wrapper for this
function.
18.2.163.6. EXAMPLES
Construct a structure:
pmix_query_t query;
PMIx_Query_construct(&query);