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
212cffbf
Commit
212cffbf
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 process_tfs.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
53e54833
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
34 deletions
+17
-34
typegen.c
tools/widl/typegen.c
+17
-34
No files found.
tools/widl/typegen.c
View file @
212cffbf
...
...
@@ -3675,52 +3675,35 @@ static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *ty
return
write_type_tfs
(
file
,
2
,
attrs
,
type
,
name
,
write_ptr
?
TYPE_CONTEXT_CONTAINER
:
TYPE_CONTEXT_CONTAINER_NO_POINTERS
,
tfsoff
);
}
static
unsigned
int
process_tfs_stmts
(
FILE
*
file
,
const
statement_list_t
*
stmts
,
type_pred_t
pred
,
unsigned
int
*
typeformat_offset
)
static
void
process_tfs_iface
(
type_t
*
iface
,
FILE
*
file
,
int
indent
,
unsigned
int
*
offset
)
{
const
statement_t
*
stmt_func
;
var_t
*
var
;
const
statement_t
*
stmt
;
if
(
stmts
)
LIST_FOR_EACH_ENTRY
(
stmt
,
stmts
,
const
statement_t
,
entry
)
current_iface
=
iface
;
STATEMENTS_FOR_EACH_FUNC
(
stmt_func
,
type_iface_get_stmts
(
iface
)
)
{
const
type_t
*
iface
;
const
statement_t
*
stmt_func
;
const
var_t
*
func
=
stmt_func
->
u
.
var
;
current_func
=
func
;
if
(
is_local
(
func
->
attrs
))
continue
;
if
(
stmt
->
type
!=
STMT_TYPE
||
type_get_type
(
stmt
->
u
.
type
)
!=
TYPE_INTERFACE
)
continue
;
var
=
type_function_get_retval
(
func
->
type
);
if
(
!
is_void
(
var
->
type
))
var
->
typestring_offset
=
write_type_tfs
(
file
,
2
,
func
->
attrs
,
var
->
type
,
func
->
name
,
TYPE_CONTEXT_PARAM
,
offset
);
iface
=
stmt
->
u
.
type
;
if
(
!
pred
(
iface
))
continue
;
current_iface
=
iface
;
STATEMENTS_FOR_EACH_FUNC
(
stmt_func
,
type_iface_get_stmts
(
iface
)
)
{
const
var_t
*
func
=
stmt_func
->
u
.
var
;
current_func
=
func
;
if
(
is_local
(
func
->
attrs
))
continue
;
var
=
type_function_get_retval
(
func
->
type
);
if
(
!
is_void
(
var
->
type
))
var
->
typestring_offset
=
write_type_tfs
(
file
,
2
,
func
->
attrs
,
var
->
type
,
func
->
name
,
TYPE_CONTEXT_PARAM
,
typeformat_offset
);
if
(
type_get_function_args
(
func
->
type
))
LIST_FOR_EACH_ENTRY
(
var
,
type_get_function_args
(
func
->
type
),
var_t
,
entry
)
var
->
typestring_offset
=
write_type_tfs
(
file
,
2
,
var
->
attrs
,
var
->
type
,
var
->
name
,
TYPE_CONTEXT_TOPLEVELPARAM
,
typeformat_offset
);
}
if
(
type_get_function_args
(
func
->
type
))
LIST_FOR_EACH_ENTRY
(
var
,
type_get_function_args
(
func
->
type
),
var_t
,
entry
)
var
->
typestring_offset
=
write_type_tfs
(
file
,
2
,
var
->
attrs
,
var
->
type
,
var
->
name
,
TYPE_CONTEXT_TOPLEVELPARAM
,
offset
);
}
return
*
typeformat_offset
+
1
;
}
static
unsigned
int
process_tfs
(
FILE
*
file
,
const
statement_list_t
*
stmts
,
type_pred_t
pred
)
{
unsigned
int
typeformat_offset
=
2
;
return
process_tfs_stmts
(
file
,
stmts
,
pred
,
&
typeformat_offset
)
;
for_each_iface
(
stmts
,
process_tfs_iface
,
pred
,
file
,
0
,
&
typeformat_offset
);
return
typeformat_offset
+
1
;
}
...
...
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