mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Make hashtables use a little less space on 64-bit architectures.
svn:r5585
This commit is contained in:
parent
b881742d87
commit
7e6a41af93
@ -438,8 +438,8 @@ smartlist_sort_strings(smartlist_t *sl)
|
||||
#define DEFINE_MAP_STRUCTS(maptype, keydecl, prefix) \
|
||||
typedef struct prefix ## entry_t { \
|
||||
HT_ENTRY(prefix ## entry_t) node; \
|
||||
keydecl; \
|
||||
void *val; \
|
||||
keydecl; \
|
||||
} prefix ## entry_t; \
|
||||
struct maptype { \
|
||||
HT_HEAD(prefix ## impl, prefix ## entry_t) head; \
|
||||
|
@ -11,10 +11,10 @@
|
||||
|
||||
#define HT_HEAD(name, type) \
|
||||
struct name { \
|
||||
/* How long is the hash table? */ \
|
||||
unsigned hth_table_length; \
|
||||
/* The hash table itself. */ \
|
||||
struct type **hth_table; \
|
||||
/* How long is the hash table? */ \
|
||||
unsigned hth_table_length; \
|
||||
/* How many elements does the table contain? */ \
|
||||
unsigned hth_n_entries; \
|
||||
/* How many elements will we allow in the table before resizing it? */ \
|
||||
|
Loading…
Reference in New Issue
Block a user