aboutsummaryrefslogtreecommitdiff
path: root/builtins/thread.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-02 18:47:39 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-02 18:47:39 -0400
commit61e482f6f36aee6f72392a6188f2ec5c858b88fd (patch)
treebea4123fcc62dd834405ae89ce9fe260e90a0023 /builtins/thread.c
parentf0f8f218703ebb4512b3cd3f9e06b86a7d9861b0 (diff)
Initial WIP first past
Diffstat (limited to 'builtins/thread.c')
-rw-r--r--builtins/thread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtins/thread.c b/builtins/thread.c
index b9586917..793a0101 100644
--- a/builtins/thread.c
+++ b/builtins/thread.c
@@ -3,7 +3,6 @@
#include <ctype.h>
#include <err.h>
#include <gc.h>
-#include <gc/cord.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
@@ -14,6 +13,7 @@
#include "array.h"
#include "functions.h"
#include "halfsiphash.h"
+#include "text.h"
#include "types.h"
#include "util.h"
@@ -39,13 +39,13 @@ public void Thread$detach(pthread_t *thread)
pthread_detach(*thread);
}
-CORD Thread$as_text(const pthread_t **thread, bool colorize, const TypeInfo *type)
+Text_t Thread$as_text(const pthread_t **thread, bool colorize, const TypeInfo *type)
{
(void)type;
if (!thread) {
- return colorize ? "\x1b[34;1mThread\x1b[m" : "Thread";
+ return Text$from_str(colorize ? "\x1b[34;1mThread\x1b[m" : "Thread");
}
- return CORD_asprintf(colorize ? "\x1b[34;1mThread(%p)\x1b[m" : "Thread(%p)", *thread);
+ return Text$format(colorize ? "\x1b[34;1mThread(%p)\x1b[m" : "Thread(%p)", *thread);
}
public const TypeInfo Thread = {