aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/tables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/tables.c')
-rw-r--r--src/stdlib/tables.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/tables.c b/src/stdlib/tables.c
index 753059c8..a89ae85f 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"
@@ -147,8 +148,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]));