[or-cvs] Make hashtables use a little less space on 64-bit architect...
Nick Mathewson
nickm at seul.org
Wed Dec 14 21:10:08 UTC 2005
Update of /home/or/cvsroot/tor/src/common
In directory moria:/tmp/cvs-serv13983/src/common
Modified Files:
container.c ht.h
Log Message:
Make hashtables use a little less space on 64-bit architectures.
Index: container.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/container.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- container.c 14 Dec 2005 20:40:39 -0000 1.54
+++ container.c 14 Dec 2005 21:10:06 -0000 1.55
@@ -438,8 +438,8 @@
#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; \
Index: ht.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/ht.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ht.h 14 Dec 2005 20:40:39 -0000 1.3
+++ ht.h 14 Dec 2005 21:10:06 -0000 1.4
@@ -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? */ \
More information about the tor-commits
mailing list