[PATCH 7/7] widl: Generate proper prototypes for function declarations without arguments.
Henri Verbeet
hverbeet at codeweavers.com
Tue Sep 8 09:38:03 CDT 2009
---
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);
--
1.6.0.6
More information about the wine-patches
mailing list