No more anonymous structs (not standard C++) (#1305)

This is one step to restoring `-pedantic` builds
This commit is contained in:
Sylvie
2024-02-19 02:12:20 -05:00
committed by GitHub
parent a02687a83e
commit 9cdd0b8a02
8 changed files with 65 additions and 65 deletions

View File

@@ -39,9 +39,9 @@ struct Symbol {
int32_t (*numCallback)(void);
// For SYM_MACRO and SYM_EQUS; TODO: have separate fields
struct {
size_t macroSize;
char *macro;
};
size_t size;
char *value;
} macro;
// For SYM_EQUS
char const *(*strCallback)(void);
};
@@ -97,7 +97,7 @@ static inline char const *sym_GetStringValue(struct Symbol const *sym)
{
if (sym->hasCallback)
return sym->strCallback();
return sym->macro;
return sym->macro.value;
}
void sym_ForEach(void (*func)(struct Symbol *, void *), void *arg);