Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e9c771f9
Commit
e9c771f9
authored
Jan 24, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Error if an array is in the middle of a structure.
Fix detection of conformant arrays and output an error if the array isn't at the end of the structure.
parent
362d42e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
parser.y
tools/widl/parser.y
+14
-1
No files found.
tools/widl/parser.y
View file @
e9c771f9
...
@@ -1257,9 +1257,13 @@ static int get_struct_type(var_t *field)
...
@@ -1257,9 +1257,13 @@ static int get_struct_type(var_t *field)
continue;
continue;
}
}
if (is_array_type(field->attrs, field->ptr_level, field->array))
if (is_array_type(field->attrs, field->ptr_level, field->array) &&
field->array && !field->array->is_const)
{
{
has_conformant_array = 1;
has_conformant_array = 1;
if (PREV_LINK(field))
yyerror("field %s deriving from a conformant array must be the last field in the structure\n",
field->name);
continue;
continue;
}
}
...
@@ -1303,6 +1307,9 @@ static int get_struct_type(var_t *field)
...
@@ -1303,6 +1307,9 @@ static int get_struct_type(var_t *field)
break;
break;
case RPC_FC_CARRAY:
case RPC_FC_CARRAY:
has_conformant_array = 1;
has_conformant_array = 1;
if (PREV_LINK(field))
yyerror("field %s deriving from a conformant array must be the last field in the structure\n",
field->name);
break;
break;
case RPC_FC_C_CSTRING:
case RPC_FC_C_CSTRING:
case RPC_FC_C_WSTRING:
case RPC_FC_C_WSTRING:
...
@@ -1320,11 +1327,17 @@ static int get_struct_type(var_t *field)
...
@@ -1320,11 +1327,17 @@ static int get_struct_type(var_t *field)
case RPC_FC_CPSTRUCT:
case RPC_FC_CPSTRUCT:
has_conformant_array = 1;
has_conformant_array = 1;
if (PREV_LINK(field))
yyerror("field %s deriving from a conformant array must be the last field in the structure\n",
field->name);
has_pointer = 1;
has_pointer = 1;
break;
break;
case RPC_FC_CSTRUCT:
case RPC_FC_CSTRUCT:
has_conformant_array = 1;
has_conformant_array = 1;
if (PREV_LINK(field))
yyerror("field %s deriving from a conformant array must be the last field in the structure\n",
field->name);
break;
break;
case RPC_FC_PSTRUCT:
case RPC_FC_PSTRUCT:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment