QB_MAP_FOREACH(3)
π QB_MAP_FOREACH(3) π
okay bestie, welcome to the libqb Programmer's Manual β¨ this one's a lil bop, i promise.
πΈ NAME πΈ
qb_map_foreach β literally calls the function you hand it, once for every single key/value pair chillin' in the map. every. last. one. no skips π
β¨ SYNOPSIS β¨
#include <qb/qbmap.h>
void qb_map_foreach(
qb_map_t *map,
qb_map_transverse_fn func,
void *user_data
);
like. three args. that's it. we love a low-effort queen π
π¦ DESCRIPTION π¦
so here's the vibe: your func gets handed the key and the value of each pair, plus the user_data you passed in (the "given data parameter", if we're being formal about it π).
and bestie β the map is traversed in sorted order. not random. not chaotic. sorted. the way that it just walks through everything in order is genuinely so satisfying, it's giving organized. it's giving main character energy. periodt π
π SEE ALSO π
the whole friend group, fr fr β go say hi:
qb_trie_dump(3)qb_map_iter_create(3)qb_skiplist_create(3)qb_map_notify_del(3)qb_map_put(3)qb_map_count_get(3)qb_map_pref_iter_create(3)qb_map_iter_next(3)qb_map_get(3)qb_map_destroy(3)qb_hashtable_create(3)qb_map_iter_free(3)qb_map_notify_add(3)qb_trie_create(3)qb_map_notify_del_2(3)qb_map_rm(3)
π COPYRIGHT π
Copyright (C) 2010-2020 Red Hat, Inc.
π reminder bestie: this is from the libqb manual, dated 2025-09-16, and it lives under the name LIBQB. no cap. now go foreach over something cute π«Άπ
π¦ where this page comes from
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- ubuntu resolute: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms