/*
* Routines to provide a memory-efficient hashtable.
*
- * Copyright (C) 2007 Wayne Davison
+ * Copyright (C) 2007-2008 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
tbl->size = size;
tbl->entries = 0;
tbl->node_size = node_size;
- tbl->key64 = key64;
+ tbl->key64 = (short)key64;
return tbl;
}
a = b = c = 0xdeadbeef + (8 << 2);
#define rot(x,k) (((x)<<(k)) ^ ((x)>>(32-(k))))
+#if SIZEOF_INT64 >= 8
b += (uint32)(key >> 32);
+#endif
a += (uint32)key;
c ^= b; c -= rot(b, 14);
a ^= c; a -= rot(c, 11);