From: Ted Lemon Date: Mon, 6 Mar 2000 23:26:47 +0000 (+0000) Subject: - Add pointers to reference counting routines to hash table definition. X-Git-Tag: V3-BETA-2-PATCH-1~289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=287d577cac7d4136af8b2d0f5117c293d9e05396;p=thirdparty%2Fdhcp.git - Add pointers to reference counting routines to hash table definition. - Use void * instead of unsigned char * for pointers to hashed objects. --- diff --git a/includes/hash.h b/includes/hash.h index ce4ac47c4..c4b063559 100644 --- a/includes/hash.h +++ b/includes/hash.h @@ -22,16 +22,21 @@ #define DEFAULT_HASH_SIZE 97 +typedef int (*hash_reference) (void *, void *, const char *, int); +typedef int (*hash_dereference) (void *, const char *, int); + struct hash_bucket { struct hash_bucket *next; const unsigned char *name; unsigned len; - unsigned char *value; + void *value; }; struct hash_table { unsigned hash_count; struct hash_bucket *buckets [DEFAULT_HASH_SIZE]; + hash_reference referencer; + hash_dereference dereferencer; }; struct named_hash {