diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-30 14:39:30 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-30 14:39:30 -0400 |
| commit | 1a6ce0047bbc5125c386f65ae348688f98a9bb3f (patch) | |
| tree | ee56e2b3535ddcbc36fab5240d804d95f7744b5f /stdlib/ranges.c | |
| parent | 2ba07c2cf53a765d4decb2cb09dbf5e1e99f1966 (diff) | |
Rename TypeInfo -> TypeInfo_t and fix up some typeinfo code
Diffstat (limited to 'stdlib/ranges.c')
| -rw-r--r-- | stdlib/ranges.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/ranges.c b/stdlib/ranges.c index 6c81c15e..ae469bc4 100644 --- a/stdlib/ranges.c +++ b/stdlib/ranges.c @@ -15,7 +15,7 @@ #include "util.h" -PUREFUNC static int32_t Range$compare(const Range_t *x, const Range_t *y, const TypeInfo *type) +PUREFUNC static int32_t Range$compare(const Range_t *x, const Range_t *y, const TypeInfo_t *type) { (void)type; if (x == y) return 0; @@ -26,14 +26,14 @@ PUREFUNC static int32_t Range$compare(const Range_t *x, const Range_t *y, const return Int$compare(&x->step, &y->step, &Int$info); } -PUREFUNC static bool Range$equal(const Range_t *x, const Range_t *y, const TypeInfo *type) +PUREFUNC static bool Range$equal(const Range_t *x, const Range_t *y, const TypeInfo_t *type) { (void)type; if (x == y) return true; return Int$equal(&x->first, &y->first, &Int$info) && Int$equal(&x->last, &y->last, &Int$info) && Int$equal(&x->step, &y->step, &Int$info); } -static Text_t Range$as_text(const Range_t *r, bool use_color, const TypeInfo *type) +static Text_t Range$as_text(const Range_t *r, bool use_color, const TypeInfo_t *type) { (void)type; if (!r) return Text("Range"); @@ -54,7 +54,7 @@ PUREFUNC public Range_t Range$by(Range_t r, Int_t step) return (Range_t){r.first, r.last, Int$times(step, r.step)}; } -public const TypeInfo Range$info = {sizeof(Range_t), __alignof(Range_t), {.tag=CustomInfo, .CustomInfo={ +public const TypeInfo_t Range$info = {sizeof(Range_t), __alignof(Range_t), {.tag=CustomInfo, .CustomInfo={ .as_text=(void*)Range$as_text, .compare=(void*)Range$compare, .equal=(void*)Range$equal, |
