18.2.105. PMIx_Info_list_add_value
PMIx_Info_list_add_value — Append an entry to an opaque
pmix_info_t(5) list from a key and a
pmix_value_t
18.2.105.1. SYNOPSIS
#include <pmix.h>
pmix_status_t PMIx_Info_list_add_value(void *ptr,
const char *key,
const pmix_value_t *value);
18.2.105.1.1. Python Syntax
No Python equivalent
18.2.105.2. INPUT PARAMETERS
ptr: Opaque list handle returned by PMIx_Info_list_start(3).key: String key to be loaded. Must be no longer thanPMIX_MAX_KEYLEN.value: Pointer to apmix_value_twhose contents are to be copied into the new entry.
18.2.105.3. DESCRIPTION
Create a new pmix_info_t entry from the provided
key and an already-constructed pmix_value_t, and append it to the end of
the list identified by ptr. The key is loaded into the entry and the value
is transferred with a deep copy, so the caller’s value may be modified or
freed after the function returns.
This routine is a convenience for cases where the caller already holds the data
in a pmix_value_t rather than as a raw pointer plus
pmix_data_type_t(5). Compare
PMIx_Info_list_add(3), which takes the raw
value and type directly. No duplicate-key check is performed; use
PMIx_Info_list_add_value_unique(3)
for that.
18.2.105.4. RETURN VALUE
Returns PMIX_SUCCESS on success, or a negative PMIx error constant on
failure — PMIX_ERR_NOMEM if the entry could not be allocated, or any
error returned while copying the value.