pips_multimap_set_value()

Updated: April 19, 2023

Set a value in the current multimap

Synopsis:

#include <pips/multimap.h>
int pips_multimap_set_value(pips_multimap_t *multimap,
                            pips_multimap_type_e type,
                            const char *key,
                            const pips_multimap_value_t *value,
                            size_t opt_size)

Arguments:

multimap
The multimap with a mapping (item) for which the value is being set
type
The type of value being associated with the key
key
A string containing the key of the mapping being updated
value
The new value to associate with the given key
opt_size
If the value type is PIPS_MULTIMAP_BLOB, this argument determines the number of bytes of binary data to assign to the value

Library:

pips-client

Description:

This function assigns the given value to the item with the given key in the current multimap instance. If a mapping for this key already exists, its value is replaced by the new value and the old value is lost.

Returns:

0
The new value was set successfully
-1
An error prevented the value from being set