| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#ifndef ECL_CACHE_H |
| 14 |
#define ECL_CACHE_H |
| 15 |
|
| 16 |
#ifdef __cplusplus |
| 17 |
extern "C" { |
| 18 |
#endif |
| 19 |
|
| 20 |
typedef struct ecl_cache { |
| 21 |
cl_object keys; |
| 22 |
cl_object table; |
| 23 |
cl_index generation; |
| 24 |
#ifdef ECL_THREADS |
| 25 |
cl_object clear_list; |
| 26 |
#endif |
| 27 |
} *ecl_cache_ptr; |
| 28 |
|
| 29 |
typedef struct ecl_cache_record { |
| 30 |
cl_object key; |
| 31 |
cl_object value; |
| 32 |
cl_object gen; |
| 33 |
} *ecl_cache_record_ptr; |
| 34 |
|
| 35 |
extern ecl_cache_ptr ecl_make_cache(cl_index key_size, cl_index cache_size); |
| 36 |
extern ecl_cache_record_ptr ecl_search_cache(ecl_cache_ptr cache); |
| 37 |
extern void ecl_cache_remove_one(ecl_cache_ptr cache, cl_object first_key); |
| 38 |
|
| 39 |
#ifdef __cplusplus |
| 40 |
} |
| 41 |
#endif |
| 42 |
|
| 43 |
|
| 44 |
#endif |