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
66b8574d
Commit
66b8574d
authored
Apr 14, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Apr 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Output a warning if duplicate attributes are specified.
parent
aa202217
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
parser.y
tools/widl/parser.y
+15
-0
No files found.
tools/widl/parser.y
View file @
66b8574d
...
@@ -138,6 +138,7 @@ static const attr_list_t *check_library_attrs(const char *name, const attr_list_
...
@@ -138,6 +138,7 @@ static const attr_list_t *check_library_attrs(const char *name, const attr_list_
static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs);
static const attr_list_t *check_module_attrs(const char *name, const attr_list_t *attrs);
static const attr_list_t *check_module_attrs(const char *name, const attr_list_t *attrs);
static const attr_list_t *check_coclass_attrs(const char *name, const attr_list_t *attrs);
static const attr_list_t *check_coclass_attrs(const char *name, const attr_list_t *attrs);
const char *get_attr_display_name(enum attr_type type);
#define tsENUM 1
#define tsENUM 1
#define tsSTRUCT 2
#define tsSTRUCT 2
...
@@ -1031,12 +1032,21 @@ static str_list_t *append_str(str_list_t *list, char *str)
...
@@ -1031,12 +1032,21 @@ static str_list_t *append_str(str_list_t *list, char *str)
static attr_list_t *append_attr(attr_list_t *list, attr_t *attr)
static attr_list_t *append_attr(attr_list_t *list, attr_t *attr)
{
{
attr_t *attr_existing;
if (!attr) return list;
if (!attr) return list;
if (!list)
if (!list)
{
{
list = xmalloc( sizeof(*list) );
list = xmalloc( sizeof(*list) );
list_init( list );
list_init( list );
}
}
LIST_FOR_EACH_ENTRY(attr_existing, list, attr_t, entry)
if (attr_existing->type == attr->type)
{
parser_warning("duplicate attribute %s\n", get_attr_display_name(attr->type));
/* use the last attribute, like MIDL does */
list_remove(&attr_existing->entry);
break;
}
list_add_tail( list, &attr->entry );
list_add_tail( list, &attr->entry );
return list;
return list;
}
}
...
@@ -2211,6 +2221,11 @@ struct allowed_attr allowed_attr[] =
...
@@ -2211,6 +2221,11 @@ struct allowed_attr allowed_attr[] =
/* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "wire_marshal" },
/* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "wire_marshal" },
};
};
const char *get_attr_display_name(enum attr_type type)
{
return allowed_attr[type].display_name;
}
static const attr_list_t *check_iface_attrs(const char *name, const attr_list_t *attrs)
static const attr_list_t *check_iface_attrs(const char *name, const attr_list_t *attrs)
{
{
const attr_t *attr;
const attr_t *attr;
...
...
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