- if(type->type == TYPE_COMPOUND_STRUCT) {
- write_struct(declaration->symbol, (compound_type_t*) type);
- } else if(type->type == TYPE_COMPOUND_UNION) {
- write_union(declaration->symbol, (compound_type_t*) type);
- } else if(type->type == TYPE_ENUM) {
- write_enum(declaration->symbol, (enum_type_t*) type);
+ if(type->kind == TYPE_COMPOUND_STRUCT) {
+ write_struct(declaration->symbol, &type->compound);
+ } else if(type->kind == TYPE_COMPOUND_UNION) {
+ write_union(declaration->symbol, &type->compound);
+ } else if(type->kind == TYPE_ENUM) {
+ write_enum(declaration->symbol, &type->enumt);