Commit 09dd285d authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

widl: Initialise [out] only conformant arrays.

This isn't strictly what midl does, however VB relies on the array in IEnumVARIANT_Next() being zero initialised. Native uses stubless proxies, where the initialisation is performed in NdrStubCall2().
parent 0ea8bf17
......@@ -4034,10 +4034,22 @@ void assign_stub_out_args( FILE *file, int indent, const var_t *func, const char
if (type_array_has_conformance(var->type))
{
unsigned int size;
type_t *type = var->type;
type_t *type;
fprintf(file, " = NdrAllocate(&__frame->_StubMsg, ");
for ( ;
for (type = var->type;
is_array(type) && type_array_has_conformance(type);
type = type_array_get_element(type))
{
write_expr(file, type_array_get_conformance(type), TRUE,
TRUE, NULL, NULL, local_var_prefix);
fprintf(file, " * ");
}
size = type_memsize(type);
fprintf(file, "%u);\n", size);
print_file(file, indent, "memset(%s%s, 0, ", local_var_prefix, var->name);
for (type = var->type;
is_array(type) && type_array_has_conformance(type);
type = type_array_get_element(type))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment