From b69d14b89492919dc5c1669d2c569ee3baf1bbb0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 4 Nov 2024 01:12:37 -0500 Subject: Add some missing functionality for Bytes --- stdlib/bytes.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'stdlib/bytes.h') diff --git a/stdlib/bytes.h b/stdlib/bytes.h index 2a92f658..f073979f 100644 --- a/stdlib/bytes.h +++ b/stdlib/bytes.h @@ -13,6 +13,16 @@ PUREFUNC Text_t Byte$as_text(const Byte_t *b, bool colorize, const TypeInfo_t *type); +#define Byte_to_Int64(b, _) ((Int64_t)(b)) +#define Byte_to_Int32(b, _) ((Int32_t)(b)) +#define Byte_to_Int16(b, _) ((Int16_t)(b)) +#define Byte_to_Int8(b, _) ((Int8_t)(b)) + +#define Int64_to_Byte(b, _) ((Byte_t)(b)) +#define Int32_to_Byte(b, _) ((Byte_t)(b)) +#define Int16_to_Byte(b, _) ((Byte_t)(b)) +#define Int8_to_Byte(b, _) ((Byte_t)(b)) + extern const Byte_t Byte$min; extern const Byte_t Byte$max; -- cgit v1.2.3