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
2babcd6c
Commit
2babcd6c
authored
Aug 14, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Use the type_type field to track whether the type is an alias.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
07c131f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
8 deletions
+3
-8
typetree.c
tools/widl/typetree.c
+1
-3
typetree.h
tools/widl/typetree.h
+2
-2
widltypes.h
tools/widl/widltypes.h
+0
-3
No files found.
tools/widl/typetree.c
View file @
2babcd6c
...
...
@@ -59,7 +59,6 @@ type_t *make_type(enum type_type type)
t
->
user_types_registered
=
FALSE
;
t
->
tfswrite
=
FALSE
;
t
->
checked
=
FALSE
;
t
->
is_alias
=
FALSE
;
t
->
typelib_idx
=
-
1
;
init_loc_info
(
&
t
->
loc_info
);
return
t
;
...
...
@@ -188,12 +187,11 @@ type_t *type_new_pointer(unsigned char pointer_default, type_t *ref, attr_list_t
type_t
*
type_new_alias
(
type_t
*
t
,
const
char
*
name
)
{
type_t
*
a
=
duptype
(
t
,
0
);
type_t
*
a
=
make_type
(
TYPE_ALIAS
);
a
->
name
=
xstrdup
(
name
);
a
->
attrs
=
NULL
;
a
->
orig
=
t
;
a
->
is_alias
=
TRUE
;
/* for pointer types */
a
->
details
=
t
->
details
;
init_loc_info
(
&
a
->
loc_info
);
...
...
tools/widl/typetree.h
View file @
2babcd6c
...
...
@@ -59,7 +59,7 @@ type_t *duptype(type_t *t, int dupname);
/* un-alias the type until finding the non-alias type */
static
inline
type_t
*
type_get_real_type
(
const
type_t
*
type
)
{
if
(
type
->
is_alias
)
if
(
type
->
type_type
==
TYPE_ALIAS
)
return
type_get_real_type
(
type
->
orig
);
else
return
(
type_t
*
)
type
;
...
...
@@ -299,7 +299,7 @@ static inline unsigned char type_array_get_ptr_default_fc(const type_t *type)
static
inline
int
type_is_alias
(
const
type_t
*
type
)
{
return
type
->
is_alias
;
return
type
->
type_type
==
TYPE_ALIAS
;
}
static
inline
type_t
*
type_alias_get_aliasee
(
const
type_t
*
type
)
...
...
tools/widl/widltypes.h
View file @
2babcd6c
...
...
@@ -451,7 +451,6 @@ struct _type_t {
unsigned
int
user_types_registered
:
1
;
unsigned
int
tfswrite
:
1
;
/* if the type needs to be written to the TFS */
unsigned
int
checked
:
1
;
unsigned
int
is_alias
:
1
;
/* is the type an alias? */
};
struct
_var_t
{
...
...
@@ -593,8 +592,6 @@ char *format_namespace(struct namespace *namespace, const char *prefix, const ch
static
inline
enum
type_type
type_get_type_detect_alias
(
const
type_t
*
type
)
{
if
(
type
->
is_alias
)
return
TYPE_ALIAS
;
return
type
->
type_type
;
}
...
...
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