Dan Hipschman : widl: Declare fixed-size array args as pointers to
arrays.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Apr 26 10:23:58 CDT 2007
Module: wine
Branch: master
Commit: a67c37f871fb21da67048ce70f916544ba7bc968
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a67c37f871fb21da67048ce70f916544ba7bc968
Author: Dan Hipschman <dsh at linux.ucla.edu>
Date: Wed Apr 25 18:20:56 2007 -0700
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 deletions(-)
diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c
index e07d2af..2d6b75b 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 6f95b09..a51a69c 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 f169f82..d63c49a 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");
}
More information about the wine-cvs
mailing list