diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 17:44:17 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 17:44:17 -0500 |
| commit | 1dcfbdc5c79c26b0f5d5997bed755e93f47e2ec1 (patch) | |
| tree | d923e233ddcd0a53698e9c6a9b85fe5023327e1b /builtins/pointer.c | |
| parent | 1bcf6bdc9a2652366bc152a1d98524743623bdf5 (diff) | |
Rename 'cord' to 'as_str'
Diffstat (limited to 'builtins/pointer.c')
| -rw-r--r-- | builtins/pointer.c | 7 |
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); |
