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
2fe1f367
Commit
2fe1f367
authored
Jan 01, 2009
by
Michael Karcher
Committed by
Alexandre Julliard
Jan 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Recurse search for need of delegation.
If any ancestor of an interface needs delegation, the interface itself has holes in the vtables and thus needs delegation, too.
parent
aff1dbe5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
proxy.c
tools/widl/proxy.c
+24
-5
No files found.
tools/widl/proxy.c
View file @
2fe1f367
...
...
@@ -197,6 +197,24 @@ static int need_delegation(const type_t *iface)
return
iface
->
ref
&&
iface
->
ref
->
ref
&&
iface
->
ref
->
ignore
;
}
static
int
get_delegation_indirect
(
const
type_t
*
iface
,
const
type_t
**
delegate_to
)
{
const
type_t
*
cur_iface
;
for
(
cur_iface
=
iface
;
cur_iface
!=
NULL
;
cur_iface
=
cur_iface
->
ref
)
if
(
need_delegation
(
cur_iface
))
{
if
(
delegate_to
)
*
delegate_to
=
cur_iface
->
ref
;
return
1
;
}
return
0
;
}
static
int
need_delegation_indirect
(
const
type_t
*
iface
)
{
return
get_delegation_indirect
(
iface
,
NULL
);
}
static
void
proxy_check_pointers
(
const
var_list_t
*
args
)
{
const
var_t
*
arg
;
...
...
@@ -626,7 +644,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset)
fprintf
(
proxy
,
"};
\n
"
);
print_proxy
(
"
\n
"
);
print_proxy
(
"static %sCInterfaceStubVtbl _%sStubVtbl =
\n
"
,
need_delegation
(
iface
)
?
""
:
"const "
,
iface
->
name
);
need_delegation
_indirect
(
iface
)
?
""
:
"const "
,
iface
->
name
);
print_proxy
(
"{
\n
"
);
indent
++
;
print_proxy
(
"{
\n
"
);
...
...
@@ -639,7 +657,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset)
print_proxy
(
"},
\n
"
,
iface
->
name
);
print_proxy
(
"{
\n
"
);
indent
++
;
print_proxy
(
"CStdStubBuffer_%s
\n
"
,
need_delegation
(
iface
)
?
"DELEGATING_METHODS"
:
"METHODS"
);
print_proxy
(
"CStdStubBuffer_%s
\n
"
,
need_delegation
_indirect
(
iface
)
?
"DELEGATING_METHODS"
:
"METHODS"
);
indent
--
;
print_proxy
(
"}
\n
"
);
indent
--
;
...
...
@@ -773,6 +791,7 @@ void write_proxies(const statement_list_t *stmts)
char
*
file_id
=
proxy_token
;
int
i
,
count
,
have_baseiid
;
type_t
**
interfaces
;
const
type_t
*
delegate_to
;
if
(
!
do_proxies
)
return
;
if
(
do_everything
&&
!
need_proxy_file
(
stmts
))
return
;
...
...
@@ -826,14 +845,14 @@ void write_proxies(const statement_list_t *stmts)
fprintf
(
proxy
,
"};
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
if
((
have_baseiid
=
does_any_iface
(
stmts
,
need_delegation
)))
if
((
have_baseiid
=
does_any_iface
(
stmts
,
need_delegation
_indirect
)))
{
fprintf
(
proxy
,
"static const IID * _%s_BaseIIDList[] =
\n
"
,
file_id
);
fprintf
(
proxy
,
"{
\n
"
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
need_delegation
(
interfaces
[
i
]
))
fprintf
(
proxy
,
" &IID_%s, /* %s */
\n
"
,
interfaces
[
i
]
->
ref
->
name
,
interfaces
[
i
]
->
name
);
if
(
get_delegation_indirect
(
interfaces
[
i
],
&
delegate_to
))
fprintf
(
proxy
,
" &IID_%s, /* %s */
\n
"
,
delegate_to
->
name
,
interfaces
[
i
]
->
name
);
else
fprintf
(
proxy
,
" 0,
\n
"
);
}
...
...
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