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
f131795b
Commit
f131795b
authored
Aug 15, 2019
by
Richard Pospesel
Committed by
Alexandre Julliard
Aug 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Pass a decl_spec_t to type_new_alias().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d4dfbb63
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
parser.y
tools/widl/parser.y
+5
-3
typetree.c
tools/widl/typetree.c
+2
-2
typetree.h
tools/widl/typetree.h
+1
-1
No files found.
tools/widl/parser.y
View file @
f131795b
...
...
@@ -1188,7 +1188,8 @@ static void decl_builtin_basic(const char *name, enum type_basic_type type)
static void decl_builtin_alias(const char *name, type_t *t)
{
reg_type(type_new_alias(t, name), name, NULL, 0);
const decl_spec_t ds = {.type = t};
reg_type(type_new_alias(&ds, name), name, NULL, 0);
}
void init_types(void)
...
...
@@ -1802,7 +1803,8 @@ static declarator_t *make_declarator(var_t *var)
static type_t *make_safearray(type_t *type)
{
const decl_spec_t ds = {.type = type_new_alias(type, "SAFEARRAY")};
decl_spec_t ds = {.type = type};
ds.type = type_new_alias(&ds, "SAFEARRAY");
return type_new_array(NULL, &ds, TRUE, 0, NULL, NULL, FC_RP);
}
...
...
@@ -1975,7 +1977,7 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
cur->loc_info.line_number);
name = declare_var(attrs, decl_spec, decl, 0);
cur = type_new_alias(
name->declspec.type
, name->name);
cur = type_new_alias(
&name->declspec
, name->name);
cur->attrs = attrs;
if (is_incomplete(cur))
...
...
tools/widl/typetree.c
View file @
f131795b
...
...
@@ -184,13 +184,13 @@ type_t *type_new_pointer(unsigned char pointer_default, type_t *ref, attr_list_t
return
t
;
}
type_t
*
type_new_alias
(
type
_t
*
t
,
const
char
*
name
)
type_t
*
type_new_alias
(
const
decl_spec
_t
*
t
,
const
char
*
name
)
{
type_t
*
a
=
make_type
(
TYPE_ALIAS
);
a
->
name
=
xstrdup
(
name
);
a
->
attrs
=
NULL
;
a
->
details
.
alias
.
aliasee
.
type
=
t
;
a
->
details
.
alias
.
aliasee
=
*
t
;
init_loc_info
(
&
a
->
loc_info
);
return
a
;
...
...
tools/widl/typetree.h
View file @
f131795b
...
...
@@ -31,7 +31,7 @@ enum name_type {
type_t
*
type_new_function
(
var_list_t
*
args
);
type_t
*
type_new_pointer
(
unsigned
char
pointer_default
,
type_t
*
ref
,
attr_list_t
*
attrs
);
type_t
*
type_new_alias
(
type
_t
*
t
,
const
char
*
name
);
type_t
*
type_new_alias
(
const
decl_spec
_t
*
t
,
const
char
*
name
);
type_t
*
type_new_module
(
char
*
name
);
type_t
*
type_new_array
(
const
char
*
name
,
const
decl_spec_t
*
element
,
int
declptr
,
unsigned
int
dim
,
expr_t
*
size_is
,
expr_t
*
length_is
,
...
...
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