From baf990e65c62f42e45fe25ac385db9536d3f1788 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 27 Apr 2025 16:49:38 -0400 Subject: Update stdlib to use `print` instead of `printf` in all cases. This means bringing in fpconv to do float-to-string conversion and a few updates to integer and number methods for string formatting. --- src/stdlib/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/stdlib/memory.c') diff --git a/src/stdlib/memory.c b/src/stdlib/memory.c index ed2ded40..46729f83 100644 --- a/src/stdlib/memory.c +++ b/src/stdlib/memory.c @@ -16,7 +16,8 @@ public Text_t Memory$as_text(const void *p, bool colorize, const TypeInfo_t *info) { (void)info; if (!p) return Text("Memory"); - return Text$format(colorize ? "\x1b[0;34;1mMemory<%p>\x1b[m" : "Memory<%p>", p); + Text_t text = Text$from_str(String("Memory<", *(void**)p, ">")); + return colorize ? Texts(Text("\x1b[0;34;1m"), text, Text("\x1b[m")) : text; } public const TypeInfo_t Memory$info = { -- cgit v1.2.3