From 5127202722b2e9f07b4df9be2dc411baa5545290 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 31 Oct 2023 21:41:53 +0000 Subject: Introduced 3 new union members to data_t These new members are just signed versions of the previous members. This makes type punning and usage for signed versions easier than before (no need for memcpy). --- lib/base.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/base.h') diff --git a/lib/base.h b/lib/base.h index 64d8f74..7acf13f 100644 --- a/lib/base.h +++ b/lib/base.h @@ -48,8 +48,11 @@ typedef i64 s_word; typedef union { byte as_byte; + s_byte as_char; hword as_hword; + s_hword as_int; word as_word; + s_word as_long; } data_t; typedef enum -- cgit v1.2.3-13-gbd6f