Пример #1
0
/* Exchanges hash maps 'a' and 'b'. */
void
hmap_swap(struct hmap *a, struct hmap *b)
{
    struct hmap tmp = *a;
    *a = *b;
    *b = tmp;
    hmap_moved(a);
    hmap_moved(b);
}
Пример #2
0
/* Adjusts 'simap' so that it is still valid after it has been moved around in
 * memory (e.g. due to realloc()). */
void
simap_moved(struct simap *simap)
{
    hmap_moved(&simap->map);
}
Пример #3
0
void
shash_moved(struct shash *sh)
{
    hmap_moved(&sh->map);
}