ucx/hash_key.c

changeset 943
9b5948aa5b90
parent 870
e167cf006213
equal deleted inserted replaced
942:488178e3e328 943:9b5948aa5b90
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