aboutsummaryrefslogtreecommitdiff
path: root/builtins/pointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtins/pointer.c')
-rw-r--r--builtins/pointer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtins/pointer.c b/builtins/pointer.c
index e0c8b549..f978acab 100644
--- a/builtins/pointer.c
+++ b/builtins/pointer.c
@@ -9,9 +9,10 @@
#include <sys/param.h>
#include <err.h>
-#include "types.h"
#include "../util.h"
#include "../SipHash/halfsiphash.h"
+#include "functions.h"
+#include "types.h"
extern const void *SSS_HASH_VECTOR;
@@ -24,7 +25,7 @@ public CORD Pointer__cord(const void *x, bool colorize, const TypeInfo *type) {
auto ptr_info = type->PointerInfo;
const void *ptr = *(const void**)x;
if (!ptr) {
- CORD typename = generic_cord(NULL, false, ptr_info.pointed);
+ CORD typename = generic_as_str(NULL, false, ptr_info.pointed);
return colorize ? CORD_asprintf("\x1b[34;1m!%s\x1b[m", typename) : CORD_cat(ptr_info.sigil, typename);
}
@@ -42,7 +43,7 @@ public CORD Pointer__cord(const void *x, bool colorize, const TypeInfo *type) {
{ // Stringify with this pointer flagged as a recursive one:
recursion_t my_recursion = {.ptr=ptr, .next=recursion};
recursion = &my_recursion;
- pointed = generic_cord(ptr, colorize, ptr_info.pointed);
+ pointed = generic_as_str(ptr, colorize, ptr_info.pointed);
recursion = recursion->next;
}
return colorize ? CORD_asprintf("\x1b[34;1m%s%r\x1b[m", ptr_info.sigil, pointed) : CORD_cat(ptr_info.sigil, pointed);