diff --git a/include/groundvm.h b/include/groundvm.h index 13c8fc1..c10158f 100644 --- a/include/groundvm.h +++ b/include/groundvm.h @@ -60,7 +60,7 @@ typedef struct GroundError { typedef struct GroundValue { GroundValueType type; struct GroundStruct* customType; - union { + struct { int64_t intVal; double doubleVal; char* stringVal; diff --git a/src/types.h b/src/types.h index 1639cd2..a288cc8 100644 --- a/src/types.h +++ b/src/types.h @@ -62,7 +62,8 @@ typedef struct GroundError { */ typedef struct GroundValue { GroundValueType type; - union { + struct GroundStruct* customType; + struct { int64_t intVal; double doubleVal; char* stringVal; @@ -74,7 +75,6 @@ typedef struct GroundValue { struct GroundStruct* structVal; struct GroundObject* customVal; } data; - struct GroundStruct* customType; } GroundValue; /*