Add strmap_isempty

svn:r2250
This commit is contained in:
Nick Mathewson 2004-08-17 06:28:34 +00:00
parent ee23b7a470
commit 8566bbb489
2 changed files with 6 additions and 0 deletions

View File

@ -740,6 +740,11 @@ void strmap_free(strmap_t *map, void (*free_val)(void*))
tor_free(map);
}
int strmap_isempty(strmap_t *map)
{
return SPLAY_EMPTY(&map->head);
}
/*
* String manipulation
*/

View File

@ -181,6 +181,7 @@ void* strmap_remove_lc(strmap_t *map, const char *key);
typedef void* (*strmap_foreach_fn)(const char *key, void *val, void *data);
void strmap_foreach(strmap_t *map, strmap_foreach_fn fn, void *data);
void strmap_free(strmap_t *map, void (*free_val)(void*));
int strmap_isempty(strmap_t *map);
strmap_iter_t *strmap_iter_init(strmap_t *map);
strmap_iter_t *strmap_iter_next(strmap_t *map, strmap_iter_t *iter);