Module: wine Branch: master Commit: a7b0a1cd4afcf5d4c33421ffacc3f4f7558dbb67 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a7b0a1cd4afcf5d4c33421ffac...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Sep 8 16:38:03 2009 +0200
widl: Generate proper prototypes for function declarations without arguments.
---
tools/widl/header.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/tools/widl/header.c b/tools/widl/header.c index 94ed1a9..b6b7be8 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -346,9 +346,14 @@ static void write_type_v(FILE *h, type_t *t, int is_field, int declonly, const c if (name) fprintf(h, "%s%s", needs_space_after(t) ? " " : "", name );
if (type_get_type_detect_alias(pt) == TYPE_FUNCTION) { + const var_list_t *args = type_function_get_args(pt); + if (ptr_level) fputc(')', h); fputc('(', h); - write_args(h, type_function_get_args(pt), NULL, 0, FALSE); + if (args) + write_args(h, args, NULL, 0, FALSE); + else + fprintf(h, "void"); fputc(')', h); } else write_type_right(h, t, is_field);