mirror of https://github.com/yshui/picom.git
cache: remove unused function cache_invalidate
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
a93bbc30e5
commit
96de4f07ca
|
@ -35,15 +35,6 @@ cache_invalidate_impl(struct cache *c, struct cache_handle *e, cache_free_t free
|
|||
}
|
||||
}
|
||||
|
||||
void cache_invalidate(struct cache *c, const char *key, cache_free_t free_fn) {
|
||||
struct cache_handle *e;
|
||||
HASH_FIND_STR(c->entries, key, e);
|
||||
|
||||
if (e) {
|
||||
cache_invalidate_impl(c, e, free_fn);
|
||||
}
|
||||
}
|
||||
|
||||
void cache_invalidate_all(struct cache *c, cache_free_t free_fn) {
|
||||
struct cache_handle *e, *tmpe;
|
||||
HASH_ITER(hh, c->entries, e, tmpe) {
|
||||
|
|
|
@ -38,9 +38,6 @@ int cache_get_or_fetch(struct cache *, const char *key, struct cache_handle **va
|
|||
/// returned.
|
||||
struct cache_handle *cache_get(struct cache *, const char *key);
|
||||
|
||||
/// Invalidate a value in the cache.
|
||||
void cache_invalidate(struct cache *, const char *key, cache_free_t free_fn);
|
||||
|
||||
/// Invalidate all values in the cache. After this call, `struct cache` holds no allocated
|
||||
/// memory, and can be discarded.
|
||||
void cache_invalidate_all(struct cache *, cache_free_t free_fn);
|
||||
|
|
Loading…
Reference in New Issue