*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
struct sset_node *sset_find(const struct sset *, const char *);
bool sset_contains(const struct sset *, const char *);
bool sset_equals(const struct sset *, const struct sset *);
struct sset_node *sset_find(const struct sset *, const char *);
bool sset_contains(const struct sset *, const char *);
bool sset_equals(const struct sset *, const struct sset *);
/* Iteration macros. */
#define SSET_FOR_EACH(NAME, SSET) \
for ((NAME) = SSET_FIRST(SSET); \
/* Iteration macros. */
#define SSET_FOR_EACH(NAME, SSET) \
for ((NAME) = SSET_FIRST(SSET); \
(NAME) = SSET_NEXT(SSET, NAME))
#define SSET_FOR_EACH_SAFE(NAME, NEXT, SSET) \
for ((NAME) = SSET_FIRST(SSET); \
(NAME) = SSET_NEXT(SSET, NAME))
#define SSET_FOR_EACH_SAFE(NAME, NEXT, SSET) \
for ((NAME) = SSET_FIRST(SSET); \
\f
/* Implementation helper macros. */
#define SSET_NODE_FROM_HMAP_NODE(HMAP_NODE) \
CONTAINER_OF(HMAP_NODE, struct sset_node, hmap_node)
#define SSET_NAME_FROM_HMAP_NODE(HMAP_NODE) \
\f
/* Implementation helper macros. */
#define SSET_NODE_FROM_HMAP_NODE(HMAP_NODE) \
CONTAINER_OF(HMAP_NODE, struct sset_node, hmap_node)
#define SSET_NAME_FROM_HMAP_NODE(HMAP_NODE) \
#define SSET_NODE_FROM_NAME(NAME) CONTAINER_OF(NAME, struct sset_node, name)
#define SSET_FIRST(SSET) SSET_NAME_FROM_HMAP_NODE(hmap_first(&(SSET)->map))
#define SSET_NEXT(SSET, NAME) \
SSET_NAME_FROM_HMAP_NODE( \
hmap_next(&(SSET)->map, &SSET_NODE_FROM_NAME(NAME)->hmap_node))
#define SSET_NODE_FROM_NAME(NAME) CONTAINER_OF(NAME, struct sset_node, name)
#define SSET_FIRST(SSET) SSET_NAME_FROM_HMAP_NODE(hmap_first(&(SSET)->map))
#define SSET_NEXT(SSET, NAME) \
SSET_NAME_FROM_HMAP_NODE( \
hmap_next(&(SSET)->map, &SSET_NODE_FROM_NAME(NAME)->hmap_node))