aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/tables.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-24 19:04:37 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-24 19:06:23 -0500
commitcb336b312e7012dc05fe7d8ac1c0e924dbc6c840 (patch)
treed2b8242e46452d12bfb1f7812f6965e64ddf9dfa /src/stdlib/tables.c
parent649977aae7e5922f992cd69eb84da0a2db368580 (diff)
Shuffle dependencies around so header files aren't needed after tomo has
been compiled
Diffstat (limited to 'src/stdlib/tables.c')
-rw-r--r--src/stdlib/tables.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stdlib/tables.c b/src/stdlib/tables.c
index d417545d..d4a51276 100644
--- a/src/stdlib/tables.c
+++ b/src/stdlib/tables.c
@@ -13,6 +13,7 @@
#include "c_strings.h"
#include "datatypes.h"
+#include "fail.h"
#include "lists.h"
#include "memory.h"
#include "metamethods.h"
@@ -146,7 +147,7 @@ static void Table$set_bucket(Table_t *t, const void *entry, int32_t index, const
static void hashmap_resize_buckets(Table_t *t, uint32_t new_capacity, const TypeInfo_t *type) {
if (unlikely(new_capacity > TABLE_MAX_BUCKETS))
- fail("Table has exceeded the maximum table size (2^31) and cannot grow further!");
+ fail_text(Text("Table has exceeded the maximum table size (2^31) and cannot grow further!"));
size_t alloc_size = sizeof(bucket_info_t) + sizeof(bucket_t[new_capacity]);
t->bucket_info = GC_MALLOC_ATOMIC(alloc_size);
memset(t->bucket_info->buckets, 0, sizeof(bucket_t[new_capacity]));