From 82849ba783e2b8f8e3a040751cd964313470e7f2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 3 Sep 2024 15:00:28 -0400 Subject: Use Text("...") literal constructor instead of Text$from_str("...") function call. --- builtins/c_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtins/c_string.c') diff --git a/builtins/c_string.c b/builtins/c_string.c index 8abb2b9f..bd35b549 100644 --- a/builtins/c_string.c +++ b/builtins/c_string.c @@ -16,9 +16,9 @@ public Text_t CString$as_text(const void *c_string, bool colorize, const TypeInfo *info) { (void)info; - if (!c_string) return Text$from_str("CString"); + if (!c_string) return Text("CString"); Text_t text = Text$from_str(*(char**)c_string); - return Text$concat(Text$from_str(colorize ? "\x1b[34mCString\x1b[m(" : "CString("), Text$quoted(text, colorize), Text$from_str(")")); + return Text$concat(colorize ? Text("\x1b[34mCString\x1b[m(") : Text("CString("), Text$quoted(text, colorize), Text(")")); } public int CString$compare(const char **x, const char **y) -- cgit v1.2.3