aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-17 14:37:19 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-17 14:37:19 -0500
commit605eb45626a0076b748a23f77a1899fc0e5b631a (patch)
tree8389a744f4adc14a22f6b57942f5ec8407fb0faf
parent81ed05c7f8b410630db28c7041bc8c58ffe7e258 (diff)
Fix table_from_entries()
-rw-r--r--builtins/table.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtins/table.c b/builtins/table.c
index cf73b256..e5ab410d 100644
--- a/builtins/table.c
+++ b/builtins/table.c
@@ -518,10 +518,7 @@ public table_t Table_from_entries(array_t entries, const TypeInfo *type)
{
assert(type->tag == TableInfo);
table_t t = {.entries=entries};
- for (int64_t i = 0; i < Table_length(&t); i++) {
- hdebug("Rehashing %u\n", i);
- Table_set_bucket(&t, GET_ENTRY(&t, i), i, type);
- }
+ hashmap_resize_buckets(&t, entries.length, type);
return t;
}