set.h revision a2341f6836da0a217ab0c5f2b82f0c4ea13d429d
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#pragma once
/***
This file is part of systemd.
Copyright 2010 Lennart Poettering
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "hashmap.h"
#include "macro.h"
}
static inline void set_free_free(Set *s) {
}
/* no set_free_free_free */
}
/* no set_update */
/* no set_replace */
}
/* no set_get2 */
}
}
/* no set_remove2 */
/* no set_remove_value */
/* no set_remove_and_replace */
}
}
}
return internal_hashmap_size(HASHMAP_BASE(s));
}
static inline bool set_isempty(Set *s) {
return set_size(s) == 0;
}
static inline unsigned set_buckets(Set *s) {
return internal_hashmap_buckets(HASHMAP_BASE(s));
}
}
static inline void set_clear_free(Set *s) {
}
/* no set_clear_free_free */
static inline void *set_steal_first(Set *s) {
return internal_hashmap_steal_first(HASHMAP_BASE(s));
}
/* no set_steal_first_key */
/* no set_first_key */
return internal_hashmap_first(HASHMAP_BASE(s));
}
/* no set_next */
static inline char **set_get_strv(Set *s) {
return internal_hashmap_get_strv(HASHMAP_BASE(s));
}
int set_put_strdup(Set *s, const char *p);
int set_put_strdupv(Set *s, char **l);
#define SET_FOREACH(e, s, i) \