From 544b1fb6a70d55bf368b827136cf0f37a26e8288 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 7 Dec 2025 21:42:45 -0500 Subject: Change Paths to be an enum of their different types. --- src/stdlib/optionals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdlib/optionals.h') diff --git a/src/stdlib/optionals.h b/src/stdlib/optionals.h index d067ec94..985d6611 100644 --- a/src/stdlib/optionals.h +++ b/src/stdlib/optionals.h @@ -15,7 +15,7 @@ #define NONE_TABLE ((OptionalTable_t){.entries.data = NULL}) #define NONE_CLOSURE ((OptionalClosure_t){.fn = NULL}) #define NONE_TEXT ((OptionalText_t){.tag = TEXT_NONE}) -#define NONE_PATH ((Path_t){.type = PATHTYPE_NONE}) +#define NONE_PATH ((Path_t){.$tag = Path$tag$none}) PUREFUNC bool is_none(const void *obj, const TypeInfo_t *non_optional_type); PUREFUNC uint64_t Optional$hash(const void *obj, const TypeInfo_t *type); -- cgit v1.2.3 From 19c8450aa0a9ea008a3e5fd4ec44f7c3761db663 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 7 Dec 2025 22:53:45 -0500 Subject: Switch paths to use Result return values instead of fail() --- src/stdlib/optionals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdlib/optionals.h') diff --git a/src/stdlib/optionals.h b/src/stdlib/optionals.h index 985d6611..700a4ada 100644 --- a/src/stdlib/optionals.h +++ b/src/stdlib/optionals.h @@ -15,7 +15,7 @@ #define NONE_TABLE ((OptionalTable_t){.entries.data = NULL}) #define NONE_CLOSURE ((OptionalClosure_t){.fn = NULL}) #define NONE_TEXT ((OptionalText_t){.tag = TEXT_NONE}) -#define NONE_PATH ((Path_t){.$tag = Path$tag$none}) +#define NONE_PATH ((OptionalPath_t){.$tag = Path$tag$none}) PUREFUNC bool is_none(const void *obj, const TypeInfo_t *non_optional_type); PUREFUNC uint64_t Optional$hash(const void *obj, const TypeInfo_t *type); -- cgit v1.2.3