summaryrefslogtreecommitdiff
path: root/src/shared/set.h
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-09-15 16:43:59 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-09-15 16:43:59 -0400
commit7398282096ba4a74b11c18082cab7db32c2b0da1 (patch)
tree77eaf24ef7c223963ab4d498d5f350932b17ff6c /src/shared/set.h
parent35257b404e1b449bcfbcbbf7dd4a713927bec8ed (diff)
hashmap: introduce hash_ops to make struct Hashmap smaller
It is redundant to store 'hash' and 'compare' function pointers in struct Hashmap separately. The functions always comprise a pair. Store a single pointer to struct hash_ops instead. systemd keeps hundreds of hashmaps, so this saves a little bit of memory. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared/set.h')
-rw-r--r--src/shared/set.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/set.h b/src/shared/set.h
index 39a5a495f5..b2f473428e 100644
--- a/src/shared/set.h
+++ b/src/shared/set.h
@@ -30,7 +30,7 @@
typedef struct Set Set;
-Set *set_new(hash_func_t hash_func, compare_func_t compare_func);
+Set *set_new(const struct hash_ops *hash_ops);
void set_free(Set* s);
int set_put(Set *s, void *value);