diff --git a/include/groundvm.h b/include/groundvm.h index 7fbad50..3e592c3 100644 --- a/include/groundvm.h +++ b/include/groundvm.h @@ -56,7 +56,7 @@ typedef struct GroundError { /* * Stores literal values created in a Ground program. */ -typedef struct GroundValue { +typedef struct __attribute__((packed)) GroundValue { GroundValueType type; struct GroundStruct* customType; union { diff --git a/src/types.h b/src/types.h index 600322c..a074664 100644 --- a/src/types.h +++ b/src/types.h @@ -60,7 +60,7 @@ typedef struct GroundError { * createIntGroundValue(), createDoubleGroundValue(), createStringGroundvalue(), * createCharGroundValue(), createBoolGroundValue(), freeGroundValue() */ -typedef struct GroundValue { +typedef struct __attribute__((packed)) GroundValue { GroundValueType type; struct GroundStruct* customType; union {