aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/bytes.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-10-19 14:07:53 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-10-19 14:07:53 -0400
commit1713c56dbf8ffaa01e559c7564928721e363ca39 (patch)
treeb1e1886076b3e44d95e082e2d1a8eb6db1437aec /src/stdlib/bytes.h
parent3a2077067343a20f631ec36838e197b34ff422f4 (diff)
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.
Diffstat (limited to 'src/stdlib/bytes.h')
-rw-r--r--src/stdlib/bytes.h1
1 files changed, 1 insertions, 0 deletions
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);