+/* Removes all hmapx_nodes from MAP and frees them. The user-defined data
+ items that the hmapx_nodes point to are not affected. */
+void
+hmapx_clear (struct hmapx *map)
+{
+ struct hmapx_node *node, *next;
+
+ for (node = hmapx_first (map); node; node = next)
+ {
+ next = hmapx_next (map, node);
+ hmapx_delete (map, node);
+ }
+}
+