22 lines
548 B
C
22 lines
548 B
C
#ifndef GUF_DICT_IMPL_H
|
|
#define GUF_DICT_IMPL_H
|
|
#include "guf_hash.h"
|
|
|
|
static inline guf_hash_size_t uint64_hash(const uint64_t *a)
|
|
{
|
|
return guf_hash(a, sizeof(uint64_t), GUF_HASH_INIT); // TODO: byte order...
|
|
}
|
|
static inline bool uint64_eq(const uint64_t *a, const uint64_t *b)
|
|
{
|
|
return *a == *b;
|
|
}
|
|
#define GUF_DICT_KEY_T uint64_t
|
|
#define GUF_DICT_KEY_HASH uint64_hash
|
|
#define GUF_DICT_KEY_T_EQ uint64_eq
|
|
#define GUF_DICT_VAL_T bool
|
|
#define GUF_DICT_VAL_T_IS_INTEGRAL_TYPE
|
|
#define GUF_DICT_NAME dict_u64_bool
|
|
#include "guf_dict.h"
|
|
|
|
|
|
#endif |