+/* 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;
+ void *data;
+
+ HMAPX_FOR_EACH_SAFE (data, node, next, map)
+ hmapx_delete (map, node);
+}
+