From a67c37f871fb21da67048ce70f916544ba7bc968 Mon Sep 17 00:00:00 2001 From: Dan Hipschman Date: Wed, 25 Apr 2007 18:20:56 -0700 Subject: [PATCH] widl: Declare fixed-size array args as pointers to arrays. --- tools/widl/proxy.c | 2 ++ tools/widl/server.c | 2 ++ tools/widl/typegen.c | 7 ++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index e07d2afccc2..2d6b75bb70f 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -416,6 +416,8 @@ static void gen_stub(type_t *iface, const func_t *cur, const char *cas, LIST_FOR_EACH_ENTRY( arg, cur->args, const var_t, entry ) { fprintf(proxy, ", "); + if (arg->array) + fprintf(proxy, "*"); write_name(proxy, arg); } } diff --git a/tools/widl/server.c b/tools/widl/server.c index 6f95b09d072..a51a69cf3ec 100644 --- a/tools/widl/server.c +++ b/tools/widl/server.c @@ -211,6 +211,8 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset, unsig else fprintf(server, ",\n"); print_server(""); + if (var->array) + fprintf(server, "*"); write_name(server, var); } fprintf(server, ");\n"); diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index f169f826daf..d63c49ac2f0 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2302,7 +2302,12 @@ void declare_stub_args( FILE *file, int indent, const func_t *func ) print_file(file, indent, ""); write_type(file, var->type, var, var->tname); fprintf(file, " "); - write_name(file, var); + if (var->array) { + fprintf(file, "( *"); + write_name(file, var); + fprintf(file, " )"); + } else + write_name(file, var); write_array(file, var->array, 0); fprintf(file, ";\n"); }