This is meant to make it easier to merge ht-internal.h back upstream
into Tor.
/* #define HT_CACHE_HASH_VALS */
#ifdef EVMAP_USE_HT
+#define HT_NO_CACHE_HASH_VALUES
#include "ht-internal.h"
struct event_map_entry;
HT_HEAD(event_io_map, event_map_entry);
#include "evmap-internal.h"
#include "iocp-internal.h"
#include "changelist-internal.h"
+#define HT_NO_CACHE_HASH_VALUES
#include "ht-internal.h"
#include "util-internal.h"
#define HT_INITIALIZER() \
{ NULL, 0, 0, 0, -1 }
-#ifdef HT_CACHE_HASH_VALUES
+#ifdef HT_NO_CACHE_HASH_VALUES
#define HT_ENTRY(type) \
struct { \
struct type *hte_next; \
- unsigned hte_hash; \
}
#else
#define HT_ENTRY(type) \
struct { \
struct type *hte_next; \
+ unsigned hte_hash; \
}
#endif
return h;
}
-#ifdef HT_CACHE_HASH_VALUES
+#ifndef HT_NO_CACHE_HASH_VALUES
#define _HT_SET_HASH(elm, field, hashfn) \
do { (elm)->field.hte_hash = hashfn(elm); } while (0)
#define _HT_SET_HASHVAL(elm, field, val) \