18.2.65. PMIx_Info_directives_string
PMIx_Info_directives_string — Return an allocated string representation of a pmix_info_directives_t(5) bit-mask.
18.2.65.1. SYNOPSIS
#include <pmix.h>
char* PMIx_Info_directives_string(pmix_info_directives_t directives);
18.2.65.1.1. Python Syntax
from pmix import *
foo = PMIxClient()
# directives is an integer bit-mask of PMIX_INFO_* flags
string = foo.info_directives_string(PMIX_INFO_REQD)
18.2.65.2. INPUT PARAMETERS
directives: A pmix_info_directives_t(5) bit-mask ofPMIX_INFO_*flags to be rendered.
18.2.65.3. DESCRIPTION
Build a human-readable rendering of the supplied
pmix_info_directives_t(5) bit-mask. The set
flags are rendered as colon-separated tokens, for example QUALIFIER for
PMIX_INFO_QUALIFIER, REQUIRED for PMIX_INFO_REQD (OPTIONAL when the
required bit is clear), PROCESSED for PMIX_INFO_REQD_PROCESSED, and END
for PMIX_INFO_ARRAY_END. When no recognized bit is set, the string
UNSPECIFIED is returned.
Unlike the const char* converter routines (such as
PMIx_Error_string(3)), which return a pointer to
storage owned by the library, PMIx_Info_directives_string returns a freshly
heap-allocated buffer (produced with strdup or the library’s argv-join
helper, both of which use malloc). The caller is responsible for releasing
it with the standard C library free() when it is no longer needed.
18.2.65.4. RETURN VALUE
Returns a pointer to an allocated, NULL-terminated string that the caller must
release with free(). Because the argument is passed by value, this routine
always returns an allocated string (UNSPECIFIED when no recognized flag is set)
rather than NULL.
18.2.65.5. NOTES
The returned buffer must be freed with free(); do not pass it to
PMIX_RELEASE or any other PMIx destructor macro.
See also