]> source.dussan.org Git - rspamd.git/commitdiff
Use const pointer for LRU cache search.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Mar 2015 17:38:13 +0000 (17:38 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Mar 2015 17:38:13 +0000 (17:38 +0000)
src/libutil/hash.c
src/libutil/hash.h

index 7610a4a9a95232ea0b2398505a2783936f8e831b..0a09e3b116d33d9888e391d3622de08463c15296 100644 (file)
@@ -124,7 +124,7 @@ rspamd_lru_hash_new (
 }
 
 gpointer
-rspamd_lru_hash_lookup (rspamd_lru_hash_t *hash, gpointer key, time_t now)
+rspamd_lru_hash_lookup (rspamd_lru_hash_t *hash, gconstpointer key, time_t now)
 {
        rspamd_lru_element_t *res;
        GList *cur, *tmp;
index 58a6e9e198f263097750fd2425312ae4180b00ea..022548f3c378ff8e6258632c31769b7c56d0a364 100644 (file)
@@ -50,7 +50,7 @@ rspamd_lru_hash_t * rspamd_lru_hash_new_full (
  * @return value of key or NULL if key is not found
  */
 gpointer rspamd_lru_hash_lookup (rspamd_lru_hash_t *hash,
-       gpointer key,
+       gconstpointer key,
        time_t now);
 /**
  * Insert item in hash