diff options
author | Dima Kogan <dima@secretsauce.net> | 2014-06-01 23:37:28 -0700 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-22 20:38:26 +0900 |
commit | c72ced175870b1dc727171867bfa0854862e8199 (patch) | |
tree | 6806b51473169ec8eb549a08bd08b4b77ec79604 /dict.h | |
parent | b3fd645cb02de43ad3bd5c803c2c89350ac611d7 (diff) | |
download | ltrace-c72ced175870b1dc727171867bfa0854862e8199.tar.gz ltrace-c72ced175870b1dc727171867bfa0854862e8199.tar.bz2 ltrace-c72ced175870b1dc727171867bfa0854862e8199.zip |
added hash and equality functions for uint64_t
The hash function is identical to the 32-bit signed int hash function. This
function is unideal for such extended use, but is sufficient for now
Diffstat (limited to 'dict.h')
-rw-r--r-- | dict.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -22,6 +22,7 @@ #define _DICT_H_ #include <stddef.h> +#include <stdint.h> #include <assert.h> #include "vect.h" @@ -231,6 +232,12 @@ size_t dict_hash_int(const int *key); /* An equality predicate callback for integers. */ int dict_eq_int(const int *key1, const int *key2); +/* A callback for hashing uint64_t. */ +size_t dict_hash_uint64(const uint64_t *key); + +/* An equality predicate callback for uint64_t. */ +int dict_eq_uint64(const uint64_t *key1, const uint64_t *key2); + /* A callback for hashing NULL-terminated strings. */ size_t dict_hash_string(const char **key); |