From 1713c56dbf8ffaa01e559c7564928721e363ca39 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 19 Oct 2025 14:07:53 -0400 Subject: Move integer implementation details into separate header/C files, backed by template headers that use an INT_BITS macro to redefine implementations for different int sizes. --- src/stdlib/bytes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stdlib/bytes.h') diff --git a/src/stdlib/bytes.h b/src/stdlib/bytes.h index f99e39ee..2f948177 100644 --- a/src/stdlib/bytes.h +++ b/src/stdlib/bytes.h @@ -20,6 +20,7 @@ Byte_t Byte$from_int32(int32_t i, bool truncate); Byte_t Byte$from_int16(int16_t i, bool truncate); OptionalByte_t Byte$parse(Text_t text, Text_t *remainder); Closure_t Byte$to(Byte_t first, Byte_t last, OptionalInt8_t step); + MACROLIKE Byte_t Byte$from_int8(int8_t i) { return (Byte_t)i; } MACROLIKE Byte_t Byte$from_bool(bool b) { return (Byte_t)b; } CONSTFUNC bool Byte$is_between(const Byte_t x, const Byte_t low, const Byte_t high); -- cgit v1.2.3