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
9825ac7a
Commit
9825ac7a
authored
Oct 24, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
Oct 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Fix a crash in compare_expr.
parent
f974facf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
typegen.c
tools/widl/typegen.c
+23
-2
No files found.
tools/widl/typegen.c
View file @
9825ac7a
...
...
@@ -228,6 +228,22 @@ static const char *get_context_handle_type_name(const type_t *type)
return
NULL
;
}
/* This is actually fairly involved to implement precisely, due to the
effects attributes may have and things like that. Right now this is
only used for optimization, so just check for a very small set of
criteria that guarantee the types are equivalent; assume every thing
else is different. */
static
int
compare_type
(
const
type_t
*
a
,
const
type_t
*
b
)
{
if
(
a
==
b
||
(
a
->
name
&&
b
->
name
&&
strcmp
(
a
->
name
,
b
->
name
)
==
0
))
return
0
;
/* Ordering doesn't need to be implemented yet. */
return
1
;
}
static
int
compare_expr
(
const
expr_t
*
a
,
const
expr_t
*
b
)
{
int
ret
;
...
...
@@ -265,12 +281,17 @@ static int compare_expr(const expr_t *a, const expr_t *b)
if
(
ret
!=
0
)
return
ret
;
return
compare_expr
(
a
->
u
.
ext
,
b
->
u
.
ext
);
case
EXPR_CAST
:
ret
=
compare_type
(
a
->
u
.
tref
,
b
->
u
.
tref
);
if
(
ret
!=
0
)
return
ret
;
/* Fall through. */
case
EXPR_NOT
:
case
EXPR_NEG
:
case
EXPR_PPTR
:
case
EXPR_CAST
:
case
EXPR_SIZEOF
:
return
compare_expr
(
a
->
ref
,
b
->
ref
);
case
EXPR_SIZEOF
:
return
compare_type
(
a
->
u
.
tref
,
b
->
u
.
tref
);
case
EXPR_VOID
:
return
0
;
}
...
...
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