mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 06:45:27 +00:00
Make a typedef for the hash comparator function.
This commit is contained in:
@@ -53,12 +53,14 @@ struct hash_bucket {
|
|||||||
void *value;
|
void *value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef int (*hash_comparator_t)(const void *, const void *, size_t);
|
||||||
|
|
||||||
struct hash_table {
|
struct hash_table {
|
||||||
unsigned hash_count;
|
unsigned hash_count;
|
||||||
struct hash_bucket *buckets [DEFAULT_HASH_SIZE];
|
struct hash_bucket *buckets [DEFAULT_HASH_SIZE];
|
||||||
hash_reference referencer;
|
hash_reference referencer;
|
||||||
hash_dereference dereferencer;
|
hash_dereference dereferencer;
|
||||||
int (*cmp) (const void *, const void *, size_t);
|
hash_comparator_t cmp;
|
||||||
int (*do_hash) (const unsigned char *, unsigned, unsigned);
|
int (*do_hash) (const unsigned char *, unsigned, unsigned);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user