From ad143fd8c06f2d46559e99c54fa2b611a25e3cc9 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Wed, 5 Oct 2016 05:31:39 +0200 Subject: Add some constness to str_map methods --- liberty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/liberty.c b/liberty.c index ab317eb..4867fdb 100644 --- a/liberty.c +++ b/liberty.c @@ -827,7 +827,7 @@ str_map_free (struct str_map *self) } static uint64_t -str_map_pos (struct str_map *self, const char *s) +str_map_pos (const struct str_map *self, const char *s) { size_t mask = self->alloc - 1; return siphash_wrapper (s, strlen (s)) & mask; @@ -943,7 +943,7 @@ str_map_set (struct str_map *self, const char *key, void *value) } static void * -str_map_find_real (struct str_map *self, const char *key) +str_map_find_real (const struct str_map *self, const char *key) { struct str_map_link *iter = self->map[str_map_pos (self, key)]; for (; iter; iter = iter->next) @@ -953,7 +953,7 @@ str_map_find_real (struct str_map *self, const char *key) } static void * -str_map_find (struct str_map *self, const char *key) +str_map_find (const struct str_map *self, const char *key) { if (!self->key_xfrm) return str_map_find_real (self, key); -- cgit v1.2.3-70-g09d2