aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/pointers.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-23 13:58:33 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-23 14:00:42 -0500
commit4a6c0438f9a2c82e834116e3e1bc110b8cae8432 (patch)
tree3cae849d6f4688a68f7417f103a6a2feaf421b06 /src/stdlib/pointers.c
parenta89500afd9a34f2af94ab6fcd7a0469b0450732a (diff)
Big speedup my trimming down MAP_LIST macro and inlining some
applications of it.
Diffstat (limited to 'src/stdlib/pointers.c')
-rw-r--r--src/stdlib/pointers.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/stdlib/pointers.c b/src/stdlib/pointers.c
index 74037613..0bf9a274 100644
--- a/src/stdlib/pointers.c
+++ b/src/stdlib/pointers.c
@@ -38,14 +38,14 @@ Text_t Pointer$as_text(const void *x, bool colorize, const TypeInfo_t *type) {
if (top_level) {
root = ptr;
} else if (ptr == root) {
- Text_t text = Texts(Text$from_str(ptr_info.sigil), Text("~1"));
- return colorize ? Texts(Text("\x1b[34;1m"), text, Text("\x1b[m")) : text;
+ Text_t text = Text$concat(Text$from_str(ptr_info.sigil), Text("~1"));
+ return colorize ? Text$concat(Text("\x1b[34;1m"), text, Text("\x1b[m")) : text;
} else {
TypeInfo_t rec_table = *Table$info(type, &Int64$info);
int64_t *id = Table$get(pending, x, &rec_table);
if (id) {
- Text_t text = Texts(Text$from_str(ptr_info.sigil), Int64$value_as_text(*id));
- return colorize ? Texts(Text("\x1b[34;1m"), text, Text("\x1b[m")) : text;
+ Text_t text = Text$concat(Text$from_str(ptr_info.sigil), Int64$value_as_text(*id));
+ return colorize ? Text$concat(Text("\x1b[34;1m"), text, Text("\x1b[m")) : text;
}
int64_t next_id = (int64_t)pending.entries.length + 2;
Table$set(&pending, x, &next_id, &rec_table);