X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fshash.h;h=38d0dbbb89e4c186d45f39186574e37fb4fe5ac7;hb=80a86fbed4023de90d7f7b174564e26c27f65b9d;hp=52cd4dca640658ee8fe7384570d22d1acab965a5;hpb=baa8f41b24179704944f278b5ae00231b1ca8246;p=openvswitch diff --git a/lib/shash.h b/lib/shash.h index 52cd4dca..38d0dbbb 100644 --- a/lib/shash.h +++ b/lib/shash.h @@ -19,6 +19,10 @@ #include "hmap.h" +#ifdef __cplusplus +extern "C" { +#endif + struct shash_node { struct hmap_node node; char *name; @@ -47,12 +51,18 @@ bool shash_is_empty(const struct shash *); size_t shash_count(const struct shash *); struct shash_node *shash_add(struct shash *, const char *, const void *); bool shash_add_once(struct shash *, const char *, const void *); +void shash_add_assert(struct shash *, const char *, const void *); void shash_delete(struct shash *, struct shash_node *); struct shash_node *shash_find(const struct shash *, const char *); void *shash_find_data(const struct shash *, const char *); void *shash_find_and_delete(struct shash *, const char *); +void *shash_find_and_delete_assert(struct shash *, const char *); struct shash_node *shash_first(const struct shash *); const struct shash_node **shash_sort(const struct shash *); bool shash_equal_keys(const struct shash *, const struct shash *); +#ifdef __cplusplus +} +#endif + #endif /* shash.h */