diff options
author | José Fonseca <[email protected]> | 2008-12-22 16:55:27 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-12-22 16:55:27 +0000 |
commit | ae7e75d6108e8621878083b35a13edc1aca893df (patch) | |
tree | 6d637af9eff90e245d46f97a923ffdc0b0aaa954 /src/gallium/auxiliary/util/u_cache.c | |
parent | 229424b2d79f7ab19c6799795df155c265e3f258 (diff) |
gallium: const correctness.
Diffstat (limited to 'src/gallium/auxiliary/util/u_cache.c')
-rw-r--r-- | src/gallium/auxiliary/util/u_cache.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/util/u_cache.c b/src/gallium/auxiliary/util/u_cache.c index 69a52687fbc..0a1a64259f1 100644 --- a/src/gallium/auxiliary/util/u_cache.c +++ b/src/gallium/auxiliary/util/u_cache.c @@ -57,10 +57,10 @@ struct util_cache_entry struct util_cache { /** Hash function */ - uint32_t (*hash)(void *key); + uint32_t (*hash)(const void *key); /** Compare two keys */ - int (*compare)(void *key1, void *key2); + int (*compare)(const void *key1, const void *key2); /** Destroy a (key, value) pair */ void (*destroy)(void *key, void *value); @@ -76,10 +76,10 @@ struct util_cache struct util_cache * -util_cache_create(uint32_t (*hash)(void *key), - int (*compare)(void *key1, void *key2), - void (*destroy)(void *key, void *value), - uint32_t size) +util_cache_create(uint32_t (*hash)(const void *key), + int (*compare)(const void *key1, const void *key2), + void (*destroy)(void *key, void *value), + uint32_t size) { struct util_cache *cache; @@ -104,7 +104,7 @@ util_cache_create(uint32_t (*hash)(void *key), static INLINE struct util_cache_entry * util_cache_entry_get(struct util_cache *cache, - void *key) + const void *key) { uint32_t hash; @@ -153,7 +153,7 @@ util_cache_set(struct util_cache *cache, void * util_cache_get(struct util_cache *cache, - void *key) + const void *key) { struct util_cache_entry *entry; |