30#define XSTRINGIFY(x) STRINGIFY(x)
31#define STRINGIFY(x) #x
37void* (*dict_malloc_func)(size_t) = malloc;
43 const int a = *(
const int*)k1;
44 const int b = *(
const int*)k2;
45 return (a > b) - (a < b);
51 const unsigned int a = *(
const unsigned int*)k1;
52 const unsigned int b = *(
const unsigned int*)k2;
53 return (a > b) - (a < b);
59 const long a = *(
const long*)k1;
60 const long b = *(
const long*)k2;
61 return (a > b) - (a < b);
67 const unsigned long a = *(
const unsigned long*)k1;
68 const unsigned long b = *(
const unsigned long*)k2;
69 return (a > b) - (a < b);
75 return (k1 > k2) - (k1 < k2);
85 char p = *a++, q = *b++;
87 return (p > q) - (p < q);
95 unsigned hash = 2166136261U;
96 for (
const uint8_t* ptr = k; *ptr;) {
97 hash = (hash ^ *ptr++) * 16777619U;
int dict_ptr_cmp(const void *k1, const void *k2)
int dict_ulong_cmp(const void *k1, const void *k2)
size_t dict_free(dict *dct, dict_delete_func delete_func)
int dict_uint_cmp(const void *k1, const void *k2)
int dict_str_cmp(const void *k1, const void *k2)
unsigned dict_str_hash(const void *k)
void dict_itor_free(dict_itor *itor)
int dict_long_cmp(const void *k1, const void *k2)
const char *const kDictVersionString
void(* dict_free_func)(void *)
int dict_int_cmp(const void *k1, const void *k2)
#define DICT_VERSION_MINOR
void(* dict_delete_func)(void *, void *)
#define DICT_VERSION_PATCH
#define DICT_VERSION_MAJOR
const itor_vtable * _vtable
const dict_vtable * _vtable