Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
83b1f081
Commit
83b1f081
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: Add function for getting the interfaces defined by a coclass type.
Split out the defining of coclass types in the parser into a function.
parent
1f519e17
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
+19
-6
parser.y
tools/widl/parser.y
+1
-4
typetree.c
tools/widl/typetree.c
+7
-0
typetree.h
tools/widl/typetree.h
+7
-0
write_msft.c
tools/widl/write_msft.c
+4
-2
No files found.
tools/widl/parser.y
View file @
83b1f081
...
...
@@ -830,10 +830,7 @@ coclasshdr: attributes coclass { $$ = $2;
;
coclassdef: coclasshdr '{' coclass_ints '}' semicolon_opt
{ $$ = $1;
$$->ifaces = $3;
$$->defined = TRUE;
}
{ $$ = type_coclass_define($1, $3); }
;
coclass_ints: { $$ = NULL; }
...
...
tools/widl/typetree.c
View file @
83b1f081
...
...
@@ -137,3 +137,10 @@ void type_module_define(type_t *module, statement_list_t *stmts)
module
->
details
.
module
->
stmts
=
stmts
;
module
->
defined
=
TRUE
;
}
type_t
*
type_coclass_define
(
type_t
*
coclass
,
ifref_list_t
*
ifaces
)
{
coclass
->
ifaces
=
ifaces
;
coclass
->
defined
=
TRUE
;
return
coclass
;
}
tools/widl/typetree.h
View file @
83b1f081
...
...
@@ -32,6 +32,7 @@ void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stm
void
type_dispinterface_define
(
type_t
*
iface
,
var_list_t
*
props
,
func_list_t
*
methods
);
void
type_dispinterface_define_from_iface
(
type_t
*
dispiface
,
type_t
*
iface
);
void
type_module_define
(
type_t
*
module
,
statement_list_t
*
stmts
);
type_t
*
type_coclass_define
(
type_t
*
coclass
,
ifref_list_t
*
ifaces
);
/* FIXME: shouldn't need to export this */
type_t
*
duptype
(
type_t
*
t
,
int
dupname
);
...
...
@@ -153,4 +154,10 @@ static inline int type_is_alias(const type_t *type)
return
type
->
is_alias
;
}
static
inline
ifref_list_t
*
type_coclass_get_ifaces
(
const
type_t
*
type
)
{
assert
(
type
->
type
==
RPC_FC_COCLASS
);
return
type
->
ifaces
;
}
#endif
/* WIDL_TYPE_TREE_H */
tools/widl/write_msft.c
View file @
83b1f081
...
...
@@ -2099,6 +2099,7 @@ static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls)
MSFT_RefRecord
*
ref
,
*
first
=
NULL
,
*
first_source
=
NULL
;
int
have_default
=
0
,
have_default_source
=
0
;
const
attr_t
*
attr
;
ifref_list_t
*
ifaces
;
if
(
-
1
<
cls
->
typelib_idx
)
return
;
...
...
@@ -2106,13 +2107,14 @@ static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls)
cls
->
typelib_idx
=
typelib
->
typelib_header
.
nrtypeinfos
;
msft_typeinfo
=
create_msft_typeinfo
(
typelib
,
TKIND_COCLASS
,
cls
->
name
,
cls
->
attrs
);
if
(
cls
->
ifaces
)
LIST_FOR_EACH_ENTRY
(
iref
,
cls
->
ifaces
,
ifref_t
,
entry
)
num_ifaces
++
;
ifaces
=
type_coclass_get_ifaces
(
cls
);
if
(
ifaces
)
LIST_FOR_EACH_ENTRY
(
iref
,
ifaces
,
ifref_t
,
entry
)
num_ifaces
++
;
offset
=
msft_typeinfo
->
typeinfo
->
datatype1
=
ctl2_alloc_segment
(
typelib
,
MSFT_SEG_REFERENCES
,
num_ifaces
*
sizeof
(
*
ref
),
0
);
i
=
0
;
if
(
cls
->
ifaces
)
LIST_FOR_EACH_ENTRY
(
iref
,
cls
->
ifaces
,
ifref_t
,
entry
)
{
if
(
ifaces
)
LIST_FOR_EACH_ENTRY
(
iref
,
ifaces
,
ifref_t
,
entry
)
{
if
(
iref
->
iface
->
typelib_idx
==
-
1
)
add_interface_typeinfo
(
typelib
,
iref
->
iface
);
ref
=
(
MSFT_RefRecord
*
)
(
typelib
->
typelib_segment_data
[
MSFT_SEG_REFERENCES
]
+
offset
+
i
*
sizeof
(
*
ref
));
...
...
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