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
b1f8560a
Commit
b1f8560a
authored
Jan 05, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Do the consistency checks on interfaces after parsing is complete.
parent
8aeaa423
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
parser.h
tools/widl/parser.h
+0
-1
parser.y
tools/widl/parser.y
+16
-5
typetree.c
tools/widl/typetree.c
+0
-2
No files found.
tools/widl/parser.h
View file @
b1f8560a
...
...
@@ -45,7 +45,6 @@ void pop_import(void);
int
is_type
(
const
char
*
name
);
void
check_functions
(
const
type_t
*
iface
);
func_list_t
*
gen_function_list
(
const
statement_list_t
*
stmts
);
#endif
tools/widl/parser.y
View file @
b1f8560a
...
...
@@ -70,8 +70,6 @@
unsigned char pointer_default = RPC_FC_UP;
static int is_object_interface = FALSE;
/* are we inside a library block? */
static int is_inside_library = FALSE;
typedef struct list typelist_t;
struct typenode {
...
...
@@ -140,6 +138,7 @@ static var_t *reg_const(var_t *var);
static char *gen_name(void);
static void check_arg(var_t *arg);
static void check_statements(const statement_list_t *stmts, int is_inside_library);
static void check_all_user_types(const statement_list_t *stmts);
static attr_list_t *check_iface_attrs(const char *name, attr_list_t *attrs);
static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs);
...
...
@@ -346,6 +345,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
%%
input: gbl_statements { fix_incomplete();
check_statements($1, FALSE);
check_all_user_types($1);
write_header($1);
write_id_data($1);
...
...
@@ -433,14 +433,12 @@ libraryhdr: tLIBRARY aIDENTIFIER { $$ = $2; }
;
library_start: attributes libraryhdr '{' { $$ = make_library($2, check_library_attrs($2, $1));
if (!parse_only) start_typelib($$);
is_inside_library = TRUE;
}
;
librarydef: library_start imp_statements '}'
semicolon_opt { $$ = $1;
$$->stmts = $2;
if (!parse_only) end_typelib();
is_inside_library = FALSE;
}
;
...
...
@@ -2540,7 +2538,7 @@ static void add_explicit_handle_if_necessary(func_t *func)
}
}
void check_functions(const type_t *iface
)
static void check_functions(const type_t *iface, int is_inside_library
)
{
if (is_attr(iface->attrs, ATTR_EXPLICIT_HANDLE) && iface->funcs)
{
...
...
@@ -2559,6 +2557,19 @@ void check_functions(const type_t *iface)
}
}
static void check_statements(const statement_list_t *stmts, int is_inside_library)
{
const statement_t *stmt;
if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry)
{
if (stmt->type == STMT_LIBRARY)
check_statements(stmt->u.lib->stmts, TRUE);
else if (stmt->type == STMT_TYPE && stmt->u.type->type == RPC_FC_IP)
check_functions(stmt->u.type, is_inside_library);
}
}
static void check_all_user_types(const statement_list_t *stmts)
{
const statement_t *stmt;
...
...
tools/widl/typetree.c
View file @
b1f8560a
...
...
@@ -73,7 +73,6 @@ void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stm
iface
->
details
.
iface
->
disp_methods
=
NULL
;
iface
->
stmts
=
stmts
;
iface
->
defined
=
TRUE
;
check_functions
(
iface
);
compute_method_indexes
(
iface
);
}
...
...
@@ -87,7 +86,6 @@ void type_dispinterface_define(type_t *iface, var_list_t *props, func_list_t *me
iface
->
details
.
iface
->
disp_methods
=
methods
;
iface
->
stmts
=
NULL
;
iface
->
defined
=
TRUE
;
check_functions
(
iface
);
compute_method_indexes
(
iface
);
}
...
...
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