Alexandre Julliard : widl: Use the real argument names in the C method macros.
Alexandre Julliard
julliard at winehq.org
Fri Jan 18 06:34:00 CST 2008
Module: wine
Branch: master
Commit: ba5336175cb9d873d46d0480943912520c587d5d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ba5336175cb9d873d46d0480943912520c587d5d
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Jan 18 12:03:22 2008 +0100
widl: Use the real argument names in the C method macros.
---
tools/widl/header.c | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/tools/widl/header.c b/tools/widl/header.c
index fd89534..0f697b8 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -578,23 +578,21 @@ static void write_method_macro(const type_t *iface, const char *name)
var_t *def = cur->def;
if (!is_callas(def->attrs)) {
const var_t *arg;
- int argc = 0;
- int c;
-
- if (cur->args) LIST_FOR_EACH_ENTRY( arg, cur->args, const var_t, entry ) argc++;
fprintf(header, "#define %s_", name);
write_name(header,def);
- fprintf(header, "(p");
- for (c=0; c<argc; c++)
- fprintf(header, ",%c", c+'a');
+ fprintf(header, "(This");
+ if (cur->args)
+ LIST_FOR_EACH_ENTRY( arg, cur->args, const var_t, entry )
+ fprintf(header, ",%s", arg->name);
fprintf(header, ") ");
- fprintf(header, "(p)->lpVtbl->");
+ fprintf(header, "(This)->lpVtbl->");
write_name(header, def);
- fprintf(header, "(p");
- for (c=0; c<argc; c++)
- fprintf(header, ",%c", c+'a');
+ fprintf(header, "(This");
+ if (cur->args)
+ LIST_FOR_EACH_ENTRY( arg, cur->args, const var_t, entry )
+ fprintf(header, ",%s", arg->name);
fprintf(header, ")\n");
}
}
More information about the wine-cvs
mailing list