aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtins/array.c8
-rw-r--r--builtins/functions.c4
-rw-r--r--builtins/functions.h2
-rw-r--r--builtins/pointer.c2
-rw-r--r--builtins/table.c2
-rw-r--r--builtins/text.c2
-rw-r--r--enums.c2
-rw-r--r--structs.c2
8 files changed, 12 insertions, 12 deletions
diff --git a/builtins/array.c b/builtins/array.c
index 77a67667..5d8d5848 100644
--- a/builtins/array.c
+++ b/builtins/array.c
@@ -426,7 +426,7 @@ public uint32_t Array$hash(const array_t *arr, const TypeInfo *type)
for (int64_t i = 0; i < arr->length; i++) {
if (p >= end) {
uint32_t chunk_hash;
- halfsiphash(&hash_batch, sizeof(hash_batch), SSS_HASH_VECTOR, (uint8_t*)&chunk_hash, sizeof(chunk_hash));
+ halfsiphash(&hash_batch, sizeof(hash_batch), TOMO_HASH_VECTOR, (uint8_t*)&chunk_hash, sizeof(chunk_hash));
p = hash_batch;
*(uint32_t*)p = chunk_hash;
p += sizeof(uint32_t);
@@ -434,7 +434,7 @@ public uint32_t Array$hash(const array_t *arr, const TypeInfo *type)
memcpy((p += item_size), arr->data + i*arr->stride, item_size);
}
uint32_t hash;
- halfsiphash(&hash_batch, ((int64_t)p) - ((int64_t)hash_batch), SSS_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
+ halfsiphash(&hash_batch, ((int64_t)p) - ((int64_t)hash_batch), TOMO_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
return hash;
} else {
uint32_t hash_batch[16] = {(uint32_t)arr->length};
@@ -442,14 +442,14 @@ public uint32_t Array$hash(const array_t *arr, const TypeInfo *type)
for (int64_t i = 0; i < arr->length; i++) {
if (p >= end) {
uint64_t chunk_hash;
- halfsiphash(&hash_batch, sizeof(hash_batch), SSS_HASH_VECTOR, (uint8_t*)&chunk_hash, sizeof(chunk_hash));
+ halfsiphash(&hash_batch, sizeof(hash_batch), TOMO_HASH_VECTOR, (uint8_t*)&chunk_hash, sizeof(chunk_hash));
p = hash_batch;
*(p++) = chunk_hash;
}
*(p++) = generic_hash(arr->data + i*arr->stride, item);
}
uint32_t hash;
- halfsiphash(&hash_batch, ((int64_t)p) - ((int64_t)hash_batch), SSS_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
+ halfsiphash(&hash_batch, ((int64_t)p) - ((int64_t)hash_batch), TOMO_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
return hash;
}
}
diff --git a/builtins/functions.c b/builtins/functions.c
index d366736e..b292f511 100644
--- a/builtins/functions.c
+++ b/builtins/functions.c
@@ -23,7 +23,7 @@
extern bool USE_COLOR;
-public const char *SSS_HASH_VECTOR = "sss hash vector ----------------------------------------------";;
+public const char *TOMO_HASH_VECTOR = "tomo hash vector ---------------------------------------------";
public void fail(CORD fmt, ...)
{
@@ -90,7 +90,7 @@ public uint32_t generic_hash(const void *obj, const TypeInfo *type)
default: {
hash_data:;
uint32_t hash;
- halfsiphash((void*)obj, type->size, SSS_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
+ halfsiphash((void*)obj, type->size, TOMO_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
return hash;
}
}
diff --git a/builtins/functions.h b/builtins/functions.h
index 53a6de2f..cd1771a8 100644
--- a/builtins/functions.h
+++ b/builtins/functions.h
@@ -8,7 +8,7 @@
#include "types.h"
-extern const char *SSS_HASH_VECTOR;
+extern const char *TOMO_HASH_VECTOR;
void fail(CORD fmt, ...);
void fail_source(const char *filename, int64_t start, int64_t end, CORD fmt, ...);
diff --git a/builtins/pointer.c b/builtins/pointer.c
index 271bb6cc..7fe8c160 100644
--- a/builtins/pointer.c
+++ b/builtins/pointer.c
@@ -65,7 +65,7 @@ public bool Pointer$equal(const void *x, const void *y, const TypeInfo *type) {
public uint32_t Pointer$hash(const void *x, const TypeInfo *type) {
(void)type;
uint32_t hash;
- halfsiphash(x, sizeof(void*), SSS_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
+ halfsiphash(x, sizeof(void*), TOMO_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
return hash;
}
diff --git a/builtins/table.c b/builtins/table.c
index 3a52d0c5..591acc96 100644
--- a/builtins/table.c
+++ b/builtins/table.c
@@ -500,7 +500,7 @@ public uint32_t Table$hash(const table_t *t, const TypeInfo *type)
default_hash,
};
uint32_t hash;
- halfsiphash(&components, sizeof(components), SSS_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
+ halfsiphash(&components, sizeof(components), TOMO_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
return hash;
}
diff --git a/builtins/text.c b/builtins/text.c
index 096c3447..b4246980 100644
--- a/builtins/text.c
+++ b/builtins/text.c
@@ -119,7 +119,7 @@ public uint32_t Text$hash(const CORD *cord)
if (!normalized) errx(1, "Unicode normalization error!");
uint32_t hash;
- halfsiphash(normalized, norm_len, SSS_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
+ halfsiphash(normalized, norm_len, TOMO_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));
if (normalized != buf) free(normalized);
return hash;
}
diff --git a/enums.c b/enums.c
index 689c7517..63df7644 100644
--- a/enums.c
+++ b/enums.c
@@ -111,7 +111,7 @@ static CORD compile_hash_method(env_t *env, ast_t *ast)
}
hash_func = CORD_all(hash_func, "}\n"
"uint32_t hash;\n"
- "halfsiphash(&hashes, sizeof(hashes), SSS_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));\n"
+ "halfsiphash(&hashes, sizeof(hashes), TOMO_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));\n"
"return hash;\n}\n");
return hash_func;
}
diff --git a/structs.c b/structs.c
index 1a6259e3..d222310e 100644
--- a/structs.c
+++ b/structs.c
@@ -103,7 +103,7 @@ static CORD compile_hash_method(env_t *env, ast_t *ast)
}
hash_func = CORD_all(hash_func, "};\n"
"uint32_t hash;\n"
- "halfsiphash(&field_hashes, sizeof(field_hashes), SSS_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));\n"
+ "halfsiphash(&field_hashes, sizeof(field_hashes), TOMO_HASH_VECTOR, (uint8_t*)&hash, sizeof(hash));\n"
"return hash;\n}\n");
return hash_func;
}