Commit 9f0c45b7 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

widl: Fix pointer detection for structures with embedded arrays.

Pointers have priority over every other type, so move the detection to the top of get_struct_type. Fall through from the embedded array detection to the embedded structure handling code so that conformance, variance and pointer presence is inherited from the array's base type.
parent 864d5a38
......@@ -1280,14 +1280,20 @@ static int get_struct_type(var_t *field)
while( (t->type == 0) && t->ref )
t = t->ref;
if (is_string_type(field->attrs, field->ptr_level, field->array))
if (field->ptr_level > 0)
{
has_pointer = 1;
continue;
}
if (is_string_type(field->attrs, 0, field->array))
{
has_conformance = 1;
has_variance = 1;
continue;
}
if (is_array_type(field->attrs, field->ptr_level, field->array))
if (is_array_type(field->attrs, 0, field->array))
{
if (field->array && !field->array->is_const)
{
......@@ -1298,13 +1304,6 @@ static int get_struct_type(var_t *field)
}
if (is_attr(field->attrs, ATTR_LENGTHIS))
has_variance = 1;
continue;
}
if (field->ptr_level > 0)
{
has_pointer = 1;
continue;
}
switch (t->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