aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-10-31 21:41:53 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-10-31 21:41:53 +0000
commit5127202722b2e9f07b4df9be2dc411baa5545290 (patch)
tree925e1f6c4c352c1d4649a81ad1482eab313c6b65 /lib
parent5202dfbb2646cfbfb585f1a00a079438010373e5 (diff)
downloadovm-5127202722b2e9f07b4df9be2dc411baa5545290.tar.gz
ovm-5127202722b2e9f07b4df9be2dc411baa5545290.tar.bz2
ovm-5127202722b2e9f07b4df9be2dc411baa5545290.zip
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).
Diffstat (limited to 'lib')
-rw-r--r--lib/base.h3
1 files changed, 3 insertions, 0 deletions
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