diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-04 01:12:37 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-04 01:12:37 -0500 |
| commit | b69d14b89492919dc5c1669d2c569ee3baf1bbb0 (patch) | |
| tree | 4244c09bb428709f0e1f6e53f25e9125c4ae3cd4 /stdlib/bytes.h | |
| parent | 81a180eda0efda86256b4aa2f8f6caecac3a9151 (diff) | |
Add some missing functionality for Bytes
Diffstat (limited to 'stdlib/bytes.h')
| -rw-r--r-- | stdlib/bytes.h | 10 |
1 files changed, 10 insertions, 0 deletions
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; |
