diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-01 13:20:17 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-01 13:20:17 -0400 |
| commit | c778c8822f1c8acf981e26f7b860a384c94cff6f (patch) | |
| tree | 550e52a4037b202de00d9f43321c996fd964c2a9 /src/stdlib/text.c | |
| parent | 639d5ddfca562e5b3645955551be244b5e8ca9c6 (diff) | |
| parent | ee020c72d92c3807fa4afcd1e170d3df81688b97 (diff) | |
Merge branch 'main' into optional-list-indexing
Diffstat (limited to 'src/stdlib/text.c')
| -rw-r--r-- | src/stdlib/text.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/stdlib/text.c b/src/stdlib/text.c index f4533be5..1dd2003e 100644 --- a/src/stdlib/text.c +++ b/src/stdlib/text.c @@ -1729,10 +1729,9 @@ Int_t Text$memory_size(Text_t text) { public Text_t Text$layout(Text_t text) { switch (text.tag) { - case TEXT_ASCII: return Texts(Text("ASCII("), Int64$as_text((int64_t[1]){text.length}, false, NULL), Text(")")); - case TEXT_GRAPHEMES: - return Texts(Text("Graphemes("), Int64$as_text((int64_t[1]){text.length}, false, NULL), Text(")")); - case TEXT_BLOB: return Texts(Text("Blob("), Int64$as_text((int64_t[1]){text.length}, false, NULL), Text(")")); + case TEXT_ASCII: return Texts(Text("ASCII("), Int64$value_as_text(text.length), Text(")")); + case TEXT_GRAPHEMES: return Texts(Text("Graphemes("), Int64$value_as_text(text.length), Text(")")); + case TEXT_BLOB: return Texts(Text("Blob("), Int64$value_as_text(text.length), Text(")")); case TEXT_CONCAT: return Texts(Text("Concat("), Text$layout(*text.left), Text(", "), Text$layout(*text.right), Text(")")); default: errx(1, "Invalid text tag: %d", text.tag); |
