src/hash_key.c

changeset 1448
0f0fe7311b76
parent 1426
3a89b31f0724
equal deleted inserted replaced
1447:aaf85b3e9601 1448:0f0fe7311b76
157 key.len = 0; 157 key.len = 0;
158 key.hash = cx_hash_u64(x); 158 key.hash = cx_hash_u64(x);
159 return key; 159 return key;
160 } 160 }
161 161
162 int cx_hash_key_cmp(const CxHashKey *left, const CxHashKey *right) { 162 int cx_hash_key_cmp(const void *l, const void *r) {
163 const CxHashKey *left = l;
164 const CxHashKey *right = r;
163 int d; 165 int d;
164 d = cx_vcmp_uint64(left->hash, right->hash); 166 d = cx_vcmp_uint64(left->hash, right->hash);
165 if (d != 0) return d; 167 if (d != 0) return d;
166 d = cx_vcmp_size(left->len, right->len); 168 d = cx_vcmp_size(left->len, right->len);
167 if (d != 0) return d; 169 if (d != 0) return d;

mercurial