Remove unnecessarily nested symbol data union

This commit is contained in:
ISSOtm
2020-08-23 02:22:23 +02:00
parent dbef51ba05
commit 7381d7b92f

View File

@@ -40,18 +40,16 @@ struct Symbol {
bool hasCallback; bool hasCallback;
union { union {
union { /* Otherwise */ /* If sym_IsNumeric */
/* If sym_IsNumeric */ int32_t value;
int32_t value; int32_t (*numCallback)(void);
int32_t (*numCallback)(void); /* For SYM_MACRO */
/* For SYM_MACRO */ struct {
struct { size_t macroSize;
size_t macroSize; char *macro;
char *macro;
};
/* For SYM_EQUS, TODO: separate "base" fields from SYM_MACRO */
char const *(*strCallback)(void); /* For SYM_EQUS */
}; };
/* For SYM_EQUS, TODO: separate "base" fields from SYM_MACRO */
char const *(*strCallback)(void); /* For SYM_EQUS */
}; };
uint32_t ID; /* ID of the symbol in the object file (-1 if none) */ uint32_t ID; /* ID of the symbol in the object file (-1 if none) */