Skip to content

MapSetOnlyL

MapSetOnlyL

Description

Replace all values for a key with exactly one key/value pair using l-value semantics.

Existing values for the key are removed before the new value is inserted.

Parameters

Name Direction Description
m in,out Hash map.
key in Key to insert or replace.
value in Value to insert or replace.

Usage example (Cross-references)

Usage examples (Cross-references)
            }
    
            MapSetOnlyL(cfg, key, value);
            StrDeinit(&key);
            StrDeinit(&value);
    /// Default set behaviour is same as `MapSetOnlyL`.
    ///
    #define MapSet(m, in_key, in_value) MapSetOnlyL((m), (in_key), (in_value))
    
    ///
Last updated on