X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=wrappergen%2Fwrite_fluffy.c;h=7b66c742e761b8d0959ee0dfcf2d97ee3b6ceb6f;hb=5978b7f86fa5b30dbaf46fc4f91239a79a8b4c27;hp=ddf940f0b9b4ec8419a387c4f3e297dd0fc33437;hpb=e1432a496fed91dd4fee062dcdc9007718c77758;p=cparser diff --git a/wrappergen/write_fluffy.c b/wrappergen/write_fluffy.c index ddf940f..7b66c74 100644 --- a/wrappergen/write_fluffy.c +++ b/wrappergen/write_fluffy.c @@ -260,7 +260,7 @@ static void write_variable(const entity_t *entity) static void write_function(const entity_t *entity) { - if (entity->function.statement != NULL) { + if (entity->function.body != NULL) { fprintf(stderr, "Warning: can't convert function bodies (at %s)\n", entity->base.symbol->string); } @@ -289,8 +289,6 @@ static void write_function(const entity_t *entity) if(function_type->variadic) { if(!first) { fprintf(out, ", "); - } else { - first = 0; } fputs("...", out); } @@ -319,8 +317,7 @@ void write_fluffy_decls(FILE *output, const translation_unit_t *unit) continue; type_t *type = entity->typedefe.type; - if(type->kind == TYPE_COMPOUND_STRUCT - || type->kind == TYPE_COMPOUND_UNION) { + if (is_type_compound(type)) { write_compound(entity->base.symbol, &type->compound); } else if(type->kind == TYPE_ENUM) { write_enum(entity->base.symbol, &type->enumt);