aboutsummaryrefslogtreecommitdiff
path: root/src/or/conscache.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-04-11 15:47:21 -0400
committerNick Mathewson <nickm@torproject.org>2017-04-24 10:59:25 -0400
commit82bb8afb6067005f52f656b658ca1a1a6501b22d (patch)
tree9ffaf8d959c6070e9322edba8d09e610627d9945 /src/or/conscache.h
parent5726fec9c22c53c77f67b26782de1803ff6cca49 (diff)
downloadtor-82bb8afb6067005f52f656b658ca1a1a6501b22d.tar.gz
tor-82bb8afb6067005f52f656b658ca1a1a6501b22d.zip
Add handle support to consensus_cache_entry_t
This will allow us to have weak references to cache entries.
Diffstat (limited to 'src/or/conscache.h')
-rw-r--r--src/or/conscache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/conscache.h b/src/or/conscache.h
index 94d7f15457..c8cda60e53 100644
--- a/src/or/conscache.h
+++ b/src/or/conscache.h
@@ -4,9 +4,13 @@
#ifndef TOR_CONSCACHE_H
#define TOR_CONSCACHE_H
+#include "handles.h"
+
typedef struct consensus_cache_entry_t consensus_cache_entry_t;
typedef struct consensus_cache_t consensus_cache_t;
+HANDLE_DECL(consensus_cache_entry, consensus_cache_entry_t, )
+
consensus_cache_t *consensus_cache_open(const char *subdir, int max_entries);
void consensus_cache_free(consensus_cache_t *cache);
void consensus_cache_unmap_lazy(consensus_cache_t *cache, time_t cutoff);