From 2442d5decb877fe282af8bceb7cff9d63be441fa Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Fri, 10 Mar 2023 09:38:58 +0100 Subject: [PATCH] Use 64 bit for type member in struct value Now all the members are aligned to 64 bits, and there is no need to pack the structure. --- src/emu/value.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/emu/value.h b/src/emu/value.h index 04f26da..595fba7 100644 --- a/src/emu/value.h +++ b/src/emu/value.h @@ -15,10 +15,9 @@ enum value_type { VALUE_DOUBLE }; -/* Packed allows the struct to be hashable, as we don't have any - * unitialized data */ -struct __attribute__((packed)) value { - enum value_type type; +/* Ensure no padding holes */ +struct value { + int64_t type; union { int64_t i; double d;