18.2.63. PMIx_Info_string
PMIx_Info_string — Return an allocated string representation of a pmix_info_t(5).
18.2.63.1. SYNOPSIS
#include <pmix.h>
char* PMIx_Info_string(const pmix_info_t *info);
18.2.63.2. INPUT PARAMETERS
info: Pointer to the pmix_info_t(5) structure to be rendered.
18.2.63.3. DESCRIPTION
Build a human-readable rendering of the supplied pmix_info_t(5), including its key, the type and contents of its embedded pmix_value_t(5), and its directive flags. The rendering is produced by the same internal print routine used elsewhere in the library, followed by a trailing newline.
Unlike the const char* converter routines (such as
PMIx_Error_string(3)), which return a pointer to
storage owned by the library, PMIx_Info_string returns a freshly
heap-allocated buffer. The buffer is allocated with the library’s asprintf
wrapper, so the caller is responsible for releasing it with the standard C
library free() when it is no longer needed. Failing to do so leaks the buffer.
18.2.63.4. RETURN VALUE
Returns a pointer to an allocated, NULL-terminated string that the caller must
release with free().
Returns NULL if the information could not be rendered — for example, if
info is NULL or references an unknown data type.
18.2.63.5. NOTES
The returned buffer must be freed with free(); do not pass it to
PMIX_RELEASE or any other PMIx destructor macro. This routine is a library
convenience function and is not part of the PMIx Standard.
See also