summaryrefslogtreecommitdiffstats
path: root/src/util/disk_cache.h
diff options
context:
space:
mode:
authorGrazvydas Ignotas <[email protected]>2017-03-05 22:58:52 +0200
committerTimothy Arceri <[email protected]>2017-03-06 09:23:17 +1100
commit175d4aa8f52a01dd21fb3774c9638a866da5dca8 (patch)
tree612a4311aca43451027896b433ef3383d5820123 /src/util/disk_cache.h
parentb19caecbd6f310c1663b0cfe483d113ae3bd5fe2 (diff)
util/disk_cache: mark read-only arguments const
No functional changes. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/util/disk_cache.h')
-rw-r--r--src/util/disk_cache.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/util/disk_cache.h b/src/util/disk_cache.h
index b7c0df25dd1..63ab9b35e2c 100644
--- a/src/util/disk_cache.h
+++ b/src/util/disk_cache.h
@@ -104,7 +104,7 @@ disk_cache_destroy(struct disk_cache *cache);
* Remove the item in the cache under the name \key.
*/
void
-disk_cache_remove(struct disk_cache *cache, cache_key key);
+disk_cache_remove(struct disk_cache *cache, const cache_key key);
/**
* Store an item in the cache under the name \key.
@@ -116,7 +116,7 @@ disk_cache_remove(struct disk_cache *cache, cache_key key);
* evicted from the cache.
*/
void
-disk_cache_put(struct disk_cache *cache, cache_key key,
+disk_cache_put(struct disk_cache *cache, const cache_key key,
const void *data, size_t size);
/**
@@ -133,7 +133,7 @@ disk_cache_put(struct disk_cache *cache, cache_key key,
* caller should call free() it when finished.
*/
void *
-disk_cache_get(struct disk_cache *cache, cache_key key, size_t *size);
+disk_cache_get(struct disk_cache *cache, const cache_key key, size_t *size);
/**
* Store the name \key within the cache, (without any associated data).
@@ -145,7 +145,7 @@ disk_cache_get(struct disk_cache *cache, cache_key key, size_t *size);
* evicted from the cache.
*/
void
-disk_cache_put_key(struct disk_cache *cache, cache_key key);
+disk_cache_put_key(struct disk_cache *cache, const cache_key key);
/**
* Test whether the name \key was previously recorded in the cache.
@@ -158,7 +158,7 @@ disk_cache_put_key(struct disk_cache *cache, cache_key key);
* disk_cache_has_key() to return true for the same key.
*/
bool
-disk_cache_has_key(struct disk_cache *cache, cache_key key);
+disk_cache_has_key(struct disk_cache *cache, const cache_key key);
#else
@@ -174,32 +174,32 @@ disk_cache_destroy(struct disk_cache *cache) {
}
static inline void
-disk_cache_put(struct disk_cache *cache, cache_key key,
+disk_cache_put(struct disk_cache *cache, const cache_key key,
const void *data, size_t size)
{
return;
}
static inline void
-disk_cache_remove(struct disk_cache *cache, cache_key key)
+disk_cache_remove(struct disk_cache *cache, const cache_key key)
{
return;
}
static inline uint8_t *
-disk_cache_get(struct disk_cache *cache, cache_key key, size_t *size)
+disk_cache_get(struct disk_cache *cache, const cache_key key, size_t *size)
{
return NULL;
}
static inline void
-disk_cache_put_key(struct disk_cache *cache, cache_key key)
+disk_cache_put_key(struct disk_cache *cache, const cache_key key)
{
return;
}
static inline bool
-disk_cache_has_key(struct disk_cache *cache, cache_key key)
+disk_cache_has_key(struct disk_cache *cache, const cache_key key)
{
return false;
}