aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-12-22 15:32:57 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-12-22 15:32:57 -0500
commitcdda494fe53374dc513b04ada2dc0fad6a8b83bc (patch)
treedb753fddb1c3ec9c2789efd9e817eb290b64905e /stdlib
parent2a12cb869ba7ae81513e771bb0dab670a80f0e32 (diff)
Revert hash thing
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/structs.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/stdlib/structs.c b/stdlib/structs.c
index 46fd9d14..010b49f7 100644
--- a/stdlib/structs.c
+++ b/stdlib/structs.c
@@ -45,13 +45,7 @@ PUREFUNC public uint64_t Struct$hash(const void *obj, const TypeInfo_t *type)
}
if (field.type->align && byte_offset % field.type->align > 0)
byte_offset += field.type->align - (byte_offset % field.type->align);
-
- if (field.type->metamethods.hash == NULL && (size_t)field.type->size < sizeof(uint64_t)) {
- memcpy(&field_hashes[i], obj + byte_offset, (size_t)field.type->size);
- } else {
- field_hashes[i] = generic_hash(obj + byte_offset, field.type);
- }
-
+ field_hashes[i] = generic_hash(obj + byte_offset, field.type);
byte_offset += field.type->size;
}
}