diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-05-28 12:28:58 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-05-28 12:28:58 -0700 |
commit | 166c247f36c800aa66d09779664c8e898f539939 (patch) | |
tree | 486836e03f128185a809bb33050a61f537be6c01 /hashtbl.h | |
parent | 6e6cd16a456715ae333a9300daa8b0536ae3785c (diff) | |
download | nasm-166c247f36c800aa66d09779664c8e898f539939.tar.gz nasm-166c247f36c800aa66d09779664c8e898f539939.tar.bz2 nasm-166c247f36c800aa66d09779664c8e898f539939.zip |
hash user allocates struct hash_table
struct hash_table, a fixed-sized structure, is now allocated by the
caller. This lets us integrate it into the Context structure, thus
avoiding an additional dynamically allocated object for no good
reason.
Add some minor code collapsing: make it more obvious that all that
differs is a pointer value, rather than relying on the compiler to do
tail merging.
Diffstat (limited to 'hashtbl.h')
-rw-r--r-- | hashtbl.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -39,7 +39,7 @@ uint64_t crc64i(uint64_t crc, const char *string); #define HASH_MEDIUM 16 #define HASH_LARGE 256 -struct hash_table *hash_init(size_t size); +void hash_init(struct hash_table *head, size_t size); void **hash_find(struct hash_table *head, const char *string, struct hash_insert *insert); void **hash_findi(struct hash_table *head, const char *string, |