From d54e9603b5f4ad385904dab75743ec25f539df58 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 26 Jul 2012 15:20:50 +0400 Subject: [PATCH] widl: Emit default argument values for cpp methods. --- tools/widl/header.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/widl/header.c b/tools/widl/header.c index 454b523d709..f19929aaf05 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -876,6 +876,13 @@ void write_args(FILE *h, const var_list_t *args, const char *name, int method, i else fprintf(h, ","); } write_type_decl(h, arg->type, arg->name); + if (method == 2) { + const expr_t *expr = get_attrp(arg->attrs, ATTR_DEFAULTVALUE); + if (expr) { + fprintf(h, " = "); + write_expr( h, expr, 0, 1, NULL, NULL, "" ); + } + } count++; } if (do_indent) indentation--; -- 2.11.4.GIT