diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-11-23 04:18:45 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-11-23 04:18:45 +0000 |
commit | a39269572fbca21eeba3ac98e2d4b74a094cd212 (patch) | |
tree | 81a5cf4433a2b5895f11b10d3f7dc0a85ba8464a /src/common/container.h | |
parent | ae67b87f9ac2927e5e6009461e3095da7a01cce3 (diff) | |
download | tor-a39269572fbca21eeba3ac98e2d4b74a094cd212.tar.gz tor-a39269572fbca21eeba3ac98e2d4b74a094cd212.zip |
Replace balanced trees with hash tables: this should make stuff significantly faster.
svn:r5441
Diffstat (limited to 'src/common/container.h')
-rw-r--r-- | src/common/container.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/common/container.h b/src/common/container.h index 5746ed8f6c..e36df0bb5d 100644 --- a/src/common/container.h +++ b/src/common/container.h @@ -110,13 +110,11 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join, #define DECLARE_MAP_FNS(maptype, keytype, prefix) \ typedef struct maptype maptype; \ - typedef struct prefix##entry_t prefix##iter_t; \ + typedef struct prefix##entry_t *prefix##iter_t; \ maptype* prefix##new(void); \ void* prefix##set(maptype *map, keytype key, void *val); \ void* prefix##get(maptype *map, keytype key); \ void* prefix##remove(maptype *map, keytype key); \ - typedef void* (*prefix##foreach_fn)(keytype key, void *val, void *data); \ - void prefix##foreach(maptype *map, prefix##foreach_fn fn, void *data); \ void prefix##free(maptype *map, void (*free_val)(void*)); \ int prefix##isempty(maptype *map); \ prefix##iter_t *prefix##iter_init(maptype *map); \ |