diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-07 00:46:26 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-07 00:46:26 -0400 |
| commit | ef23faa3e6e003282e53fc08031ec4eb9a2e2aae (patch) | |
| tree | 763944687f506e5dded02956ab3b45c456e16146 /src/stdlib/datatypes.h | |
| parent | 3554c56b209a1544c69e189ddab3b19b4bf80ae6 (diff) | |
Add Byte.to() method and improved micro optimization of iterating over
fixed-width integer ranges
Diffstat (limited to 'src/stdlib/datatypes.h')
| -rw-r--r-- | src/stdlib/datatypes.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/stdlib/datatypes.h b/src/stdlib/datatypes.h index 950c9457..77c09ddb 100644 --- a/src/stdlib/datatypes.h +++ b/src/stdlib/datatypes.h @@ -111,4 +111,12 @@ typedef struct { #define OptionalText_t Text_t #define OptionalClosure_t Closure_t +typedef struct { + Byte_t value; + bool is_none:1; +} OptionalByte_t; + +#define NONE_BYTE ((OptionalByte_t){.is_none=true}) + + // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 |
