Module: wine
Branch: refs/heads/master
Commit: 8494f57d178a042559fc9e093dd8a60b5ff22907
URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=8494f57d178a042559fc9e0…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Sat Dec 31 13:19:13 2005 +0100
widl: Output sizing information for arrays in the generated marshaling code.
---
tools/widl/typegen.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 1346729..33eecbc 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -448,11 +448,31 @@ void marshall_arguments(FILE *file, int
if (!has_length && !has_size)
array_type = "FixedArray";
else if (has_length && !has_size)
+ {
+ print_file(file, indent, "_StubMsg.Offset = (unsigned
long)0;\n"); /* FIXME */
+ print_file(file, indent, "_StubMsg.ActualCount = (unsigned
long)");
+ write_expr(file, length_is, 1);
+ fprintf(file, ";\n\n");
array_type = "VaryingArray";
+ }
else if (!has_length && has_size)
+ {
+ print_file(file, indent, "_StubMsg.MaxCount = (unsigned
long)");
+ write_expr(file, size_is ? size_is : var->array, 1);
+ fprintf(file, ";\n\n");
array_type = "ConformantArray";
+ }
else
+ {
+ print_file(file, indent, "_StubMsg.MaxCount = (unsigned
long)");
+ write_expr(file, size_is ? size_is : var->array, 1);
+ fprintf(file, ";\n");
+ print_file(file, indent, "_StubMsg.Offset = (unsigned
long)0;\n"); /* FIXME */
+ print_file(file, indent, "_StubMsg.ActualCount = (unsigned
long)");
+ write_expr(file, length_is, 1);
+ fprintf(file, ";\n\n");
array_type = "ConformantVaryingArray";
+ }
}
print_file(file, indent,