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
d0e10aa3
Commit
d0e10aa3
authored
Aug 15, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Store the type for casts and sizeof() expressions as a decl_spec_t.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1419a068
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
expr.c
tools/widl/expr.c
+6
-6
widltypes.h
tools/widl/widltypes.h
+1
-1
No files found.
tools/widl/expr.c
View file @
d0e10aa3
...
...
@@ -202,7 +202,7 @@ expr_t *make_exprt(enum expr_type type, var_t *var, expr_t *expr)
e
=
xmalloc
(
sizeof
(
expr_t
));
e
->
type
=
type
;
e
->
ref
=
expr
;
e
->
u
.
tref
=
tref
;
e
->
u
.
tref
=
var
->
declspec
;
e
->
is_const
=
FALSE
;
if
(
type
==
EXPR_SIZEOF
)
{
...
...
@@ -591,7 +591,7 @@ static struct expression_type resolve_expression(const struct expr_loc *expr_loc
break
;
case
EXPR_CAST
:
result
=
resolve_expression
(
expr_loc
,
cont_type
,
e
->
ref
);
result
.
type
=
e
->
u
.
tref
;
result
.
type
=
e
->
u
.
tref
.
type
;
break
;
case
EXPR_SIZEOF
:
result
.
is_temporary
=
FALSE
;
...
...
@@ -759,13 +759,13 @@ void write_expr(FILE *h, const expr_t *e, int brackets,
break
;
case
EXPR_CAST
:
fprintf
(
h
,
"("
);
write_type_decl
(
h
,
e
->
u
.
tref
,
NULL
);
write_type_decl
(
h
,
e
->
u
.
tref
.
type
,
NULL
);
fprintf
(
h
,
")"
);
write_expr
(
h
,
e
->
ref
,
1
,
toplevel
,
toplevel_prefix
,
cont_type
,
local_var_prefix
);
break
;
case
EXPR_SIZEOF
:
fprintf
(
h
,
"sizeof("
);
write_type_decl
(
h
,
e
->
u
.
tref
,
NULL
);
write_type_decl
(
h
,
e
->
u
.
tref
.
type
,
NULL
);
fprintf
(
h
,
")"
);
break
;
case
EXPR_SHL
:
...
...
@@ -917,7 +917,7 @@ int compare_expr(const expr_t *a, const expr_t *b)
return
ret
;
return
compare_expr
(
a
->
u
.
ext
,
b
->
u
.
ext
);
case
EXPR_CAST
:
ret
=
compare_type
(
a
->
u
.
tref
,
b
->
u
.
tref
);
ret
=
compare_type
(
a
->
u
.
tref
.
type
,
b
->
u
.
tref
.
type
);
if
(
ret
!=
0
)
return
ret
;
/* Fall through. */
...
...
@@ -929,7 +929,7 @@ int compare_expr(const expr_t *a, const expr_t *b)
case
EXPR_POS
:
return
compare_expr
(
a
->
ref
,
b
->
ref
);
case
EXPR_SIZEOF
:
return
compare_type
(
a
->
u
.
tref
,
b
->
u
.
tref
);
return
compare_type
(
a
->
u
.
tref
.
type
,
b
->
u
.
tref
.
type
);
case
EXPR_VOID
:
return
0
;
}
...
...
tools/widl/widltypes.h
View file @
d0e10aa3
...
...
@@ -319,7 +319,7 @@ struct _expr_t {
double
dval
;
const
char
*
sval
;
const
expr_t
*
ext
;
type_t
*
tref
;
decl_spec_t
tref
;
}
u
;
const
expr_t
*
ext2
;
int
is_const
;
...
...
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