diff options
Diffstat (limited to 'libass/ass_cache.h')
-rw-r--r-- | libass/ass_cache.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libass/ass_cache.h b/libass/ass_cache.h index cd72533..687c197 100644 --- a/libass/ass_cache.h +++ b/libass/ass_cache.h @@ -103,9 +103,17 @@ typedef struct { BitmapRef *bitmaps; } CompositeHashKey; -Cache *ass_cache_create(HashFunction hash_func, HashCompare compare_func, - CacheKeyMove copy_func, CacheItemDestructor destruct_func, - size_t key_size, size_t value_size); +typedef struct +{ + HashFunction hash_func; + HashCompare compare_func; + CacheKeyMove key_move_func; + CacheItemDestructor destruct_func; + size_t key_size; + size_t value_size; +} CacheDesc; + +Cache *ass_cache_create(const CacheDesc *desc); bool ass_cache_get(Cache *cache, void *key, void *value_ptr); void *ass_cache_key(void *value); void ass_cache_commit(void *value, size_t item_size); |