From 60c4432678073faa271fe9b6f632c5a3789d5727 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Mon, 26 Sep 2022 23:56:09 +0200 Subject: Deprecated c_pair() macro. Replaced with c_PAIR(), analogous to c_ARGsv() macro which are both unsafe regarding side effects on arg. --- docs/cmap_api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/cmap_api.md') diff --git a/docs/cmap_api.md b/docs/cmap_api.md index 25366792..863fbaf6 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -131,7 +131,7 @@ int main() {"RED", "#FF0000"}, {"GREEN", "#00FF00"}, {"BLUE", "#0000FF"} - }) cmap_str_emplace(&u, c_pair(i.ref)); + }) cmap_str_emplace(&u, c_PAIR(i.ref)); // Iterate and print keys and values of unordered map c_foreach (n, cmap_str, u) { @@ -174,7 +174,7 @@ int main() c_auto (cmap_id, idnames) { c_forlist (i, cmap_id_raw, { {100, "Red"}, {110, "Blue"} }) - cmap_id_emplace(&idnames, c_pair(i.ref)); + cmap_id_emplace(&idnames, c_PAIR(i.ref)); // replace existing mapped value: cmap_id_emplace_or_assign(&idnames, 110, "White"); -- cgit v1.2.3