Open PyryM opened 9 years ago
Actually, the union inside the struct is also anonymous and that causes issues. Changing the definition to:
union NVGcolor {
float rgba[4];
struct {
float r, g, b, a;
};
};
would let strict c99 still access rgba via var.rgba[idx] even though the individual channels wouldn't be available.
The internal anonymous struct is inaccessible in strict C99 (see this stack overflow question: http://stackoverflow.com/questions/1972003/how-to-compile-c-code-with-anonymous-structs-unions) and this type breaks some automatic binding generators (for example terra's terralib.includec(...) generates a malformed type for this).