From ef23faa3e6e003282e53fc08031ec4eb9a2e2aae Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 7 Apr 2025 00:46:26 -0400 Subject: Add Byte.to() method and improved micro optimization of iterating over fixed-width integer ranges --- src/stdlib/datatypes.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/stdlib/datatypes.h') 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 -- cgit v1.2.3