From c8bf38e5fb717d40635a2a89b22ed71b0de4266b Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Tue, 1 Dec 2020 13:33:34 +0100 Subject: Squashed 'dependencies/uthash/' content from commit 8e67ced git-subtree-dir: dependencies/uthash git-subtree-split: 8e67ced1d1c5bd8141c542a22630e6de78aa6b90 --- tests/lru_cache/cache.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/lru_cache/cache.h (limited to 'tests/lru_cache/cache.h') diff --git a/tests/lru_cache/cache.h b/tests/lru_cache/cache.h new file mode 100644 index 000000000..350576d4f --- /dev/null +++ b/tests/lru_cache/cache.h @@ -0,0 +1,31 @@ +/* + * ===================================================================================== + * + * Filename: cache.h + * + * Description: A simple cache + * + * Version: 1.0 + * Created: 04/11/2013 02:30:46 PM + * Revision: none + * Compiler: gcc + * + * Author: Oliver Lorenz (ol), olli@olorenz.org + * Company: https://olorenz.org + * License: This is licensed under the same terms as uthash itself + * + * ===================================================================================== + */ + +#ifndef _CACHE_ +#define _CACHE_ + +struct foo_cache; + +extern int foo_cache_create(struct foo_cache **dst, const size_t capacity, + void (*free_cb) (void *element)); +extern int foo_cache_delete(struct foo_cache *cache, int keep_data); +extern int foo_cache_lookup(struct foo_cache *cache, char *key, void *result); +extern int foo_cache_insert(struct foo_cache *cache, char *key, void *data); + +#endif -- cgit v1.2.3