diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-05 16:23:05 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-05 16:23:05 -0400 |
| commit | bac14fa6c79b6abea50fd5f188799ae8e83cb20d (patch) | |
| tree | 416a7b9ff39075ab33fb93ab4e86003df4d25aca /builtins/functions.c | |
| parent | 47e8972427c152891c4c6c4b458f78cd7ceb8aee (diff) | |
Fully clean up siphash code and fix some issues
Diffstat (limited to 'builtins/functions.c')
| -rw-r--r-- | builtins/functions.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtins/functions.c b/builtins/functions.c index 0ccc44cb..b59885bc 100644 --- a/builtins/functions.c +++ b/builtins/functions.c @@ -17,15 +17,14 @@ #include "functions.h" #include "integers.h" #include "pointer.h" +#include "siphash.h" #include "string.h" #include "table.h" #include "text.h" #include "types.h" #include "util.h" -#include "siphash.c" - -public uint8_t TOMO_HASH_KEY[16] = {0}; +public uint64_t TOMO_HASH_KEY[2] = {23, 42}; // Randomized in tomo_init() public void tomo_init(void) { @@ -115,7 +114,7 @@ public uint64_t generic_hash(const void *obj, const TypeInfo *type) return type->CustomInfo.hash(obj, type); default: { hash_data:; - return siphash24((void*)obj, type->size, (uint64_t*)TOMO_HASH_KEY); + return siphash24((void*)obj, type->size); } } } |
