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
3a8dbbb6
Commit
3a8dbbb6
authored
Nov 07, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Use for_each_iface in get_size_procformatstring.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
212cffbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
20 deletions
+11
-20
typegen.c
tools/widl/typegen.c
+11
-20
No files found.
tools/widl/typegen.c
View file @
3a8dbbb6
...
...
@@ -4537,30 +4537,21 @@ unsigned int get_size_procformatstring_func(const type_t *iface, const var_t *fu
return
offset
;
}
unsigned
int
get_size_procformatstring
(
const
statement_list_t
*
stmts
,
type_pred_t
pred
)
static
void
get_size_procformatstring_iface
(
type_t
*
iface
,
FILE
*
file
,
int
indent
,
unsigned
int
*
size
)
{
const
statement_t
*
stmt
;
unsigned
int
size
=
1
;
if
(
stmts
)
LIST_FOR_EACH_ENTRY
(
stmt
,
stmts
,
const
statement_t
,
entry
)
STATEMENTS_FOR_EACH_FUNC
(
stmt
,
type_iface_get_stmts
(
iface
)
)
{
const
type_t
*
iface
;
const
statement_t
*
stmt_func
;
if
(
stmt
->
type
!=
STMT_TYPE
||
type_get_type
(
stmt
->
u
.
type
)
!=
TYPE_INTERFACE
)
continue
;
iface
=
stmt
->
u
.
type
;
if
(
!
pred
(
iface
))
continue
;
STATEMENTS_FOR_EACH_FUNC
(
stmt_func
,
type_iface_get_stmts
(
iface
)
)
{
const
var_t
*
func
=
stmt_func
->
u
.
var
;
if
(
!
is_local
(
func
->
attrs
))
size
+=
get_size_procformatstring_func
(
iface
,
func
);
}
const
var_t
*
func
=
stmt
->
u
.
var
;
if
(
!
is_local
(
func
->
attrs
))
*
size
+=
get_size_procformatstring_func
(
iface
,
func
);
}
}
unsigned
int
get_size_procformatstring
(
const
statement_list_t
*
stmts
,
type_pred_t
pred
)
{
unsigned
int
size
=
1
;
for_each_iface
(
stmts
,
get_size_procformatstring_iface
,
pred
,
NULL
,
0
,
&
size
);
return
size
;
}
...
...
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