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
95ac84e2
Commit
95ac84e2
authored
Apr 22, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Apr 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead.
parent
cc3682cf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
11 deletions
+32
-11
header.c
tools/widl/header.c
+15
-4
parser.y
tools/widl/parser.y
+2
-2
typegen.c
tools/widl/typegen.c
+15
-4
widltypes.h
tools/widl/widltypes.h
+0
-1
No files found.
tools/widl/header.c
View file @
95ac84e2
...
...
@@ -539,8 +539,6 @@ void write_expr(FILE *h, const expr_t *e, int brackets)
case
EXPR_SUB
:
case
EXPR_AND
:
case
EXPR_OR
:
case
EXPR_MEMBERPTR
:
case
EXPR_MEMBER
:
case
EXPR_LOGOR
:
case
EXPR_LOGAND
:
case
EXPR_XOR
:
...
...
@@ -562,8 +560,6 @@ void write_expr(FILE *h, const expr_t *e, int brackets)
case
EXPR_SUB
:
fprintf
(
h
,
" - "
);
break
;
case
EXPR_AND
:
fprintf
(
h
,
" & "
);
break
;
case
EXPR_OR
:
fprintf
(
h
,
" | "
);
break
;
case
EXPR_MEMBERPTR
:
fprintf
(
h
,
"->"
);
break
;
case
EXPR_MEMBER
:
fprintf
(
h
,
"."
);
break
;
case
EXPR_LOGOR
:
fprintf
(
h
,
" || "
);
break
;
case
EXPR_LOGAND
:
fprintf
(
h
,
" && "
);
break
;
case
EXPR_XOR
:
fprintf
(
h
,
" ^ "
);
break
;
...
...
@@ -578,6 +574,21 @@ void write_expr(FILE *h, const expr_t *e, int brackets)
write_expr
(
h
,
e
->
u
.
ext
,
1
);
if
(
brackets
)
fprintf
(
h
,
")"
);
break
;
case
EXPR_MEMBER
:
if
(
brackets
)
fprintf
(
h
,
"("
);
if
(
e
->
ref
->
type
==
EXPR_PPTR
)
{
write_expr
(
h
,
e
->
ref
->
ref
,
1
);
fprintf
(
h
,
"->"
);
}
else
{
write_expr
(
h
,
e
->
ref
,
1
);
fprintf
(
h
,
"."
);
}
write_expr
(
h
,
e
->
u
.
ext
,
1
);
if
(
brackets
)
fprintf
(
h
,
")"
);
break
;
case
EXPR_COND
:
if
(
brackets
)
fprintf
(
h
,
"("
);
write_expr
(
h
,
e
->
ref
,
1
);
...
...
tools/widl/parser.y
View file @
95ac84e2
...
...
@@ -657,8 +657,8 @@ expr: aNUM { $$ = make_exprl(EXPR_NUM, $1); }
| '-' expr %prec NEG { $$ = make_expr1(EXPR_NEG, $2); }
| '&' expr %prec ADDRESSOF { $$ = make_expr1(EXPR_ADDRESSOF, $2); }
| '*' expr %prec PPTR { $$ = make_expr1(EXPR_PPTR, $2); }
| expr MEMBERPTR
expr { $$ = make_expr2(EXPR_MEMBERPTR, $1, $3
); }
| expr '.'
expr { $$ = make_expr2(EXPR_MEMBER, $1, $3
); }
| expr MEMBERPTR
aIDENTIFIER { $$ = make_expr2(EXPR_MEMBER, make_expr1(EXPR_PPTR, $1), make_exprs(EXPR_IDENTIFIER, $3)
); }
| expr '.'
aIDENTIFIER { $$ = make_expr2(EXPR_MEMBER, $1, make_exprs(EXPR_IDENTIFIER, $3)
); }
| '(' type ')' expr %prec CAST { $$ = make_exprt(EXPR_CAST, $2, $4); }
| tSIZEOF '(' type ')' { $$ = make_exprt(EXPR_SIZEOF, $3, NULL); }
| expr '[' expr ']' { $$ = make_expr2(EXPR_ARRAY, $1, $3); }
...
...
tools/widl/typegen.c
View file @
95ac84e2
...
...
@@ -357,7 +357,6 @@ static int compare_expr(const expr_t *a, const expr_t *b)
case
EXPR_DIV
:
case
EXPR_SHL
:
case
EXPR_SHR
:
case
EXPR_MEMBERPTR
:
case
EXPR_MEMBER
:
case
EXPR_ARRAY
:
case
EXPR_LOGOR
:
...
...
@@ -3179,8 +3178,6 @@ static void write_struct_expr(FILE *h, const expr_t *e, int brackets,
case
EXPR_SUB
:
case
EXPR_AND
:
case
EXPR_OR
:
case
EXPR_MEMBERPTR
:
case
EXPR_MEMBER
:
case
EXPR_LOGOR
:
case
EXPR_LOGAND
:
case
EXPR_XOR
:
...
...
@@ -3202,7 +3199,6 @@ static void write_struct_expr(FILE *h, const expr_t *e, int brackets,
case
EXPR_SUB
:
fprintf
(
h
,
" - "
);
break
;
case
EXPR_AND
:
fprintf
(
h
,
" & "
);
break
;
case
EXPR_OR
:
fprintf
(
h
,
" | "
);
break
;
case
EXPR_MEMBERPTR
:
fprintf
(
h
,
"->"
);
break
;
case
EXPR_MEMBER
:
fprintf
(
h
,
"."
);
break
;
case
EXPR_LOGOR
:
fprintf
(
h
,
" || "
);
break
;
case
EXPR_LOGAND
:
fprintf
(
h
,
" && "
);
break
;
...
...
@@ -3218,6 +3214,21 @@ static void write_struct_expr(FILE *h, const expr_t *e, int brackets,
write_struct_expr
(
h
,
e
->
u
.
ext
,
1
,
fields
,
structvar
);
if
(
brackets
)
fprintf
(
h
,
")"
);
break
;
case
EXPR_MEMBER
:
if
(
brackets
)
fprintf
(
h
,
"("
);
if
(
e
->
ref
->
type
==
EXPR_PPTR
)
{
write_expr
(
h
,
e
->
ref
->
ref
,
1
);
fprintf
(
h
,
"->"
);
}
else
{
write_expr
(
h
,
e
->
ref
,
1
);
fprintf
(
h
,
"."
);
}
write_expr
(
h
,
e
->
u
.
ext
,
1
);
if
(
brackets
)
fprintf
(
h
,
")"
);
break
;
case
EXPR_COND
:
if
(
brackets
)
fprintf
(
h
,
"("
);
write_struct_expr
(
h
,
e
->
ref
,
1
,
fields
,
structvar
);
...
...
tools/widl/widltypes.h
View file @
95ac84e2
...
...
@@ -161,7 +161,6 @@ enum expr_type
EXPR_COND
,
EXPR_TRUEFALSE
,
EXPR_ADDRESSOF
,
EXPR_MEMBERPTR
,
EXPR_MEMBER
,
EXPR_ARRAY
,
EXPR_MOD
,
...
...
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