Robert Shearman : widl: Fix detection of varying arrays.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jan 24 06:45:19 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 2eedb11f22345160bb1991f5cc841922849abc49
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=2eedb11f22345160bb1991f5cc841922849abc49
Author: Robert Shearman <rob at codeweavers.com>
Date: Tue Jan 24 11:14:38 2006 +0100
widl: Fix detection of varying arrays.
Correctly identify structures containing varying arrays as conformant
varying structures.
---
tools/widl/parser.y | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index bbce165..49532a0 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;
}
More information about the wine-cvs
mailing list