/* 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); }
/* 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); }
void shash_moved(struct shash *sh) { hmap_moved(&sh->map); }