Scroll to navigation

PMIX_VALUE_STRING(3) OpenPMIx PMIX_VALUE_STRING(3)

PMIx_Value_string — Return an allocated string representation of a pmix_value_t(5) <#man5-pmix-value-t>.

SYNOPSIS

#include <pmix.h>
char* PMIx_Value_string(const pmix_value_t *value);


Python Syntax

from pmix import *
foo = PMIxClient()
# the value is a Python ``pmix_value_t`` dictionary
pyval = {'value': 42, 'val_type': PMIX_INT32}
rc, txt = foo.value_string(pyval)


INPUT PARAMETERS

•
value: Pointer to the pmix_value_t(5) <#man5-pmix-value-t> structure to be rendered.

DESCRIPTION

Build a human-readable rendering of the supplied pmix_value_t(5) <#man5-pmix-value-t>, reporting both its data type and its contents. The rendering is produced by the library’s internal print routine for the value’s declared type.

Unlike the const char* converter routines (such as PMIx_Error_string(3) <#man3-pmix-error-string>), which return a pointer to storage owned by the library, PMIx_Value_string returns a freshly heap-allocated buffer. The buffer is allocated internally with malloc/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.

RETURN VALUE

Returns a pointer to an allocated, NULL-terminated string that the caller must release with free().

Returns NULL if the value could not be rendered — for example, if value is NULL or references an unknown data type.

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:

PMIx_Value_unload(3) <#man3-pmix-value-unload>, PMIx_Info_string(3) <#man3-pmix-info-string>


Copyright

2014-2026, OpenPMIx Community

November 5, 2026