aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/util.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-03 15:19:59 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-03 15:19:59 -0400
commit8d173710fe8cfd96bd54f9dd1cf0eccacfdd6e73 (patch)
treee93cf2ad599ed1378366303d1162a60fec5090db /src/stdlib/util.c
parentcedae3039c8d67568b5ac35833c10cbfc1c7cb23 (diff)
Deprecate heap_strf
Diffstat (limited to 'src/stdlib/util.c')
-rw-r--r--src/stdlib/util.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/stdlib/util.c b/src/stdlib/util.c
deleted file mode 100644
index 1fe33dfa..00000000
--- a/src/stdlib/util.c
+++ /dev/null
@@ -1,26 +0,0 @@
-// Built-in utility functions
-#include <ctype.h>
-#include <gc.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "text.h"
-#include "util.h"
-
-__attribute__((format(printf, 1, 2)))
-public char *heap_strf(const char *fmt, ...)
-{
- va_list args;
- va_start(args, fmt);
- char *tmp = NULL;
- int len = vasprintf(&tmp, fmt, args);
- if (len < 0) return NULL;
- va_end(args);
- char *ret = GC_strndup(tmp, (size_t)len);
- free(tmp);
- return ret;
-}
-
-// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0