From 2eedb11f22345160bb1991f5cc841922849abc49 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Tue, 24 Jan 2006 11:14:38 +0100 Subject: [PATCH] widl: Fix detection of varying arrays. Correctly identify structures containing varying arrays as conformant varying structures. --- tools/widl/parser.y | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index bbce1652d60..49532a0735c 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -1258,13 +1258,17 @@ static int get_struct_type(var_t *field) continue; } - if (is_array_type(field->attrs, field->ptr_level, field->array) && - field->array && !field->array->is_const) + if (is_array_type(field->attrs, field->ptr_level, field->array)) { - has_conformance = 1; - if (PREV_LINK(field)) - yyerror("field %s deriving from a conformant array must be the last field in the structure\n", - field->name); + if (field->array && !field->array->is_const) + { + has_conformance = 1; + if (PREV_LINK(field)) + yyerror("field %s deriving from a conformant array must be the last field in the structure\n", + field->name); + } + if (is_attr(field->attrs, ATTR_LENGTHIS)) + has_variance = 1; continue; } -- 2.11.4.GIT