mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-19 09:15:34 -04:00
Invert the sense and the name of HT_CACHE_HASH_VALUES
This is meant to make it easier to merge ht-internal.h back upstream into Tor.
This commit is contained in:
parent
6c81be746c
commit
46e5bb7bdc
@ -112,6 +112,7 @@ struct eventop {
|
|||||||
/* #define HT_CACHE_HASH_VALS */
|
/* #define HT_CACHE_HASH_VALS */
|
||||||
|
|
||||||
#ifdef EVMAP_USE_HT
|
#ifdef EVMAP_USE_HT
|
||||||
|
#define HT_NO_CACHE_HASH_VALUES
|
||||||
#include "ht-internal.h"
|
#include "ht-internal.h"
|
||||||
struct event_map_entry;
|
struct event_map_entry;
|
||||||
HT_HEAD(event_io_map, event_map_entry);
|
HT_HEAD(event_io_map, event_map_entry);
|
||||||
|
1
event.c
1
event.c
@ -68,6 +68,7 @@
|
|||||||
#include "evmap-internal.h"
|
#include "evmap-internal.h"
|
||||||
#include "iocp-internal.h"
|
#include "iocp-internal.h"
|
||||||
#include "changelist-internal.h"
|
#include "changelist-internal.h"
|
||||||
|
#define HT_NO_CACHE_HASH_VALUES
|
||||||
#include "ht-internal.h"
|
#include "ht-internal.h"
|
||||||
#include "util-internal.h"
|
#include "util-internal.h"
|
||||||
|
|
||||||
|
@ -25,16 +25,16 @@
|
|||||||
#define HT_INITIALIZER() \
|
#define HT_INITIALIZER() \
|
||||||
{ NULL, 0, 0, 0, -1 }
|
{ NULL, 0, 0, 0, -1 }
|
||||||
|
|
||||||
#ifdef HT_CACHE_HASH_VALUES
|
#ifdef HT_NO_CACHE_HASH_VALUES
|
||||||
#define HT_ENTRY(type) \
|
#define HT_ENTRY(type) \
|
||||||
struct { \
|
struct { \
|
||||||
struct type *hte_next; \
|
struct type *hte_next; \
|
||||||
unsigned hte_hash; \
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define HT_ENTRY(type) \
|
#define HT_ENTRY(type) \
|
||||||
struct { \
|
struct { \
|
||||||
struct type *hte_next; \
|
struct type *hte_next; \
|
||||||
|
unsigned hte_hash; \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ ht_string_hash(const char *s)
|
|||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HT_CACHE_HASH_VALUES
|
#ifndef HT_NO_CACHE_HASH_VALUES
|
||||||
#define _HT_SET_HASH(elm, field, hashfn) \
|
#define _HT_SET_HASH(elm, field, hashfn) \
|
||||||
do { (elm)->field.hte_hash = hashfn(elm); } while (0)
|
do { (elm)->field.hte_hash = hashfn(elm); } while (0)
|
||||||
#define _HT_SET_HASHVAL(elm, field, val) \
|
#define _HT_SET_HASHVAL(elm, field, val) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user