]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
consdiffmgr.h: use struct declarations for several types
authorNick Mathewson <nickm@torproject.org>
Mon, 16 Dec 2019 18:16:35 +0000 (13:16 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 9 Jan 2020 12:30:35 +0000 (07:30 -0500)
This prevents a dependency on include order.

src/feature/dircache/consdiffmgr.h

index f72dd5b2827de23635a1341e997932da749b5719..07ae6fac6d59c584b3ff652063b9db5d8fbb7818 100644 (file)
@@ -66,17 +66,19 @@ void consdiffmgr_free_all(void);
 int consdiffmgr_validate(void);
 
 #ifdef CONSDIFFMGR_PRIVATE
+struct consensus_cache_t;
+struct consensus_cache_entry_t;
 STATIC unsigned n_diff_compression_methods(void);
 STATIC unsigned n_consensus_compression_methods(void);
-STATIC consensus_cache_t *cdm_cache_get(void);
-STATIC consensus_cache_entry_t *cdm_cache_lookup_consensus(
+STATIC struct consensus_cache_t *cdm_cache_get(void);
+STATIC struct consensus_cache_entry_t *cdm_cache_lookup_consensus(
                           consensus_flavor_t flavor, time_t valid_after);
 STATIC int cdm_entry_get_sha3_value(uint8_t *digest_out,
-                                    consensus_cache_entry_t *ent,
+                                    struct consensus_cache_entry_t *ent,
                                     const char *label);
 STATIC int uncompress_or_set_ptr(const char **out, size_t *outlen,
                                  char **owned_out,
-                                 consensus_cache_entry_t *ent);
+                                 struct consensus_cache_entry_t *ent);
 #endif /* defined(CONSDIFFMGR_PRIVATE) */
 
 #ifdef TOR_UNIT_TESTS