aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/text.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-06-28 14:18:59 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-06-28 14:18:59 -0400
commitba7161d6a3156a966c21ea3e06168bdac9803819 (patch)
tree0fd65f8513d1ab378be83c79a4ac1db74f38df81 /src/stdlib/text.c
parent8a4d5dc57b14e7c947c25970bb4d4f4ef91450f4 (diff)
Greatly increase the maximum free space allocated when growing lists
(from 63 -> 281,474,976,710,655) to fix degenerate performance when appending to large lists.
Diffstat (limited to 'src/stdlib/text.c')
-rw-r--r--src/stdlib/text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/text.c b/src/stdlib/text.c
index 9dedccdd..0f3f9519 100644
--- a/src/stdlib/text.c
+++ b/src/stdlib/text.c
@@ -1477,7 +1477,7 @@ public List_t Text$utf32_codepoints(Text_t text)
public List_t Text$utf8_bytes(Text_t text)
{
const char *str = Text$as_c_string(text);
- return (List_t){.length=strlen(str), .stride=1, .atomic=1, .data=(void*)str};
+ return (List_t){.length=(int64_t)strlen(str), .stride=1, .atomic=1, .data=(void*)str};
}
static INLINE const char *codepoint_name(ucs4_t c)