mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Add strmap_isempty
svn:r2250
This commit is contained in:
parent
ee23b7a470
commit
8566bbb489
@ -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
|
||||
*/
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user