diff options
Diffstat (limited to 'src/stdlib')
| -rw-r--r-- | src/stdlib/datatypes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stdlib/datatypes.h b/src/stdlib/datatypes.h index caabdacd..d51db8ab 100644 --- a/src/stdlib/datatypes.h +++ b/src/stdlib/datatypes.h @@ -72,11 +72,16 @@ typedef struct table_s { typedef struct Empty$$struct { } Empty$$type; +#define EMPTY_STRUCT ((Empty$$type){}) + typedef struct { bool has_value; Empty$$type value; } $OptionalEmpty$$type; +#define NONE_EMPTY_STRUCT (($OptionalEmpty$$type){.has_value = false}) +#define OPTIONAL_EMPTY_STRUCT (($OptionalEmpty$$type){.has_value = true}) + typedef struct { void *fn, *userdata; } Closure_t; |
