*** empty log message ***
This commit is contained in:
@@ -22,7 +22,7 @@ int main(int argc, char **argv)
|
||||
|
||||
//Find key
|
||||
const char *key = "jjjjjjjjjj";
|
||||
unsigned int id = cmph_search(hash, key, strlen(key));
|
||||
unsigned int id = cmph_search(hash, key, (cmph_uint32)strlen(key));
|
||||
fprintf(stderr, "Id:%u\n", id);
|
||||
//Destroy hash
|
||||
cmph_destroy(hash);
|
||||
|
||||
@@ -21,7 +21,7 @@ int main(int argc, char **argv)
|
||||
unsigned int nkeys = 10;
|
||||
FILE* mphf_fd = fopen("temp_struct_vector.mph", "w");
|
||||
// Source of keys
|
||||
cmph_io_adapter_t *source = cmph_io_struct_vector_adapter(vector, sizeof(rec_t), sizeof(cmph_uint32), 11, nkeys);
|
||||
cmph_io_adapter_t *source = cmph_io_struct_vector_adapter(vector, (cmph_uint32)sizeof(rec_t), (cmph_uint32)sizeof(cmph_uint32), 11, nkeys);
|
||||
|
||||
//Create minimal perfect hash function using the default (chm) algorithm.
|
||||
cmph_config_t *config = cmph_config_new(source);
|
||||
|
||||
@@ -27,7 +27,7 @@ int main(int argc, char **argv)
|
||||
hash = cmph_load(mphf_fd);
|
||||
while (i < nkeys) {
|
||||
const char *key = vector[i];
|
||||
unsigned int id = cmph_search(hash, key, strlen(key));
|
||||
unsigned int id = cmph_search(hash, key, (cmph_uint32)strlen(key));
|
||||
fprintf(stderr, "key:%s -- hash:%u\n", key, id);
|
||||
i++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user