]> mj.ucw.cz Git - libucw.git/blobdiff - lib/hash-test.c
tried parametrized fastbuf for most of indexing I/O
[libucw.git] / lib / hash-test.c
index af4c7154d1f911705b0d5b74d2626c1c970f2134..803a0302e7a98c4f373ee40328a781ef00c09bf8 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 
 /* TEST 1: integers */
 
@@ -17,6 +18,7 @@ struct node1 {
 #define HASH_PREFIX(x) test1_##x
 #define HASH_KEY_ATOMIC key
 #define HASH_ATOMIC_TYPE int
+#define HASH_ZERO_FILL
 
 #define HASH_GIVE_INIT_DATA
 static inline void test1_init_data(struct node1 *n)
@@ -171,7 +173,7 @@ struct node4 {
 #define HASH_GIVE_HASHFN
 static uns test4_hash(char *host, int port)
 {
-  return hash_string_nocase(host) ^ hash_int(port);
+  return hash_string_nocase(host) ^ hash_u32(port);
 }
 
 #define HASH_GIVE_EQ