From 09942b27ae6fd7e7d394b2d251ef77c8a6f69e07 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 7 Dec 2025 19:02:13 -0500 Subject: Rename `Empty()` -> `Present()` for set-like tables --- src/stdlib/datatypes.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/stdlib/datatypes.h') diff --git a/src/stdlib/datatypes.h b/src/stdlib/datatypes.h index d51db8ab..fbd2ce73 100644 --- a/src/stdlib/datatypes.h +++ b/src/stdlib/datatypes.h @@ -69,18 +69,18 @@ typedef struct table_s { struct table_s *fallback; } Table_t; -typedef struct Empty$$struct { -} Empty$$type; +typedef struct Present$$struct { +} Present$$type; -#define EMPTY_STRUCT ((Empty$$type){}) +#define PRESENT_STRUCT ((Present$$type){}) typedef struct { bool has_value; - Empty$$type value; -} $OptionalEmpty$$type; + Present$$type value; +} $OptionalPresent$$type; -#define NONE_EMPTY_STRUCT (($OptionalEmpty$$type){.has_value = false}) -#define OPTIONAL_EMPTY_STRUCT (($OptionalEmpty$$type){.has_value = true}) +#define NONE_PRESENT_STRUCT (($OptionalPresent$$type){.has_value = false}) +#define OPTIONAL_PRESENT_STRUCT (($OptionalPresent$$type){.has_value = true}) typedef struct { void *fn, *userdata; -- cgit v1.2.3