summaryrefslogtreecommitdiffstats
path: root/libass/ass_cache.h
diff options
context:
space:
mode:
authorDr.Smile <vabnick@gmail.com>2015-09-18 00:33:33 +0300
committerDr.Smile <vabnick@gmail.com>2016-06-30 23:13:53 +0300
commitf4d6e4b9af4cfe2fe684640f19682e4f954b7549 (patch)
treee5d817822df0f3448c0708924c7babd553856197 /libass/ass_cache.h
parent25d65abce1a0fabe3c3bf81f1ee7ee7f24b91a4e (diff)
downloadlibass-f4d6e4b9af4cfe2fe684640f19682e4f954b7549.tar.bz2
libass-f4d6e4b9af4cfe2fe684640f19682e4f954b7549.tar.xz
cache: remove ass_cache_cancel(), cache failures instead
Diffstat (limited to 'libass/ass_cache.h')
-rw-r--r--libass/ass_cache.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libass/ass_cache.h b/libass/ass_cache.h
index 63e9e59..c18f9d8 100644
--- a/libass/ass_cache.h
+++ b/libass/ass_cache.h
@@ -59,6 +59,7 @@ typedef struct {
typedef unsigned(*HashFunction)(void *key, size_t key_size);
typedef size_t(*ItemSize)(void *value, size_t value_size);
typedef unsigned(*HashCompare)(void *a, void *b, size_t key_size);
+typedef bool(*CacheKeyCopy)(void *dst, void *src, size_t key_size);
typedef void(*CacheItemDestructor)(void *key, void *value);
// cache hash keys
@@ -104,12 +105,11 @@ typedef struct {
} CompositeHashKey;
Cache *ass_cache_create(HashFunction hash_func, HashCompare compare_func,
- CacheItemDestructor destruct_func, ItemSize size_func,
- size_t key_size, size_t value_size);
+ CacheKeyCopy copy_func, CacheItemDestructor destruct_func,
+ ItemSize size_func, size_t key_size, size_t value_size);
bool ass_cache_get(Cache *cache, void *key, void *value_ptr);
void *ass_cache_get_key(void *value);
void ass_cache_commit(void *value);
-void ass_cache_cancel(void *value);
void ass_cache_inc_ref(void *value);
void ass_cache_dec_ref(void *value);
void ass_cache_cut(Cache *cache, size_t max_size);