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
d4dfbb63
Commit
d4dfbb63
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_array().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e8b6c052
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
parser.y
tools/widl/parser.y
+5
-5
typetree.c
tools/widl/typetree.c
+3
-2
typetree.h
tools/widl/typetree.h
+1
-1
No files found.
tools/widl/parser.y
View file @
d4dfbb63
...
...
@@ -1622,11 +1622,11 @@ static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const decl
error_loc("%s: cannot specify size_is for an already sized array\n", v->name);
else
*ptype = type_new_array((*ptype)->name,
type_array_get_element
_type
(*ptype), FALSE,
type_array_get_element(*ptype), FALSE,
0, dim, NULL, FC_RP);
}
else if (is_ptr(*ptype))
*ptype = type_new_array((*ptype)->name, type_pointer_get_ref
_type
(*ptype), TRUE,
*ptype = type_new_array((*ptype)->name, type_pointer_get_ref(*ptype), TRUE,
0, dim, NULL, pointer_default);
else
error_loc("%s: size_is attribute applied to illegal type\n", v->name);
...
...
@@ -1648,7 +1648,7 @@ static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const decl
if (is_array(*ptype))
{
*ptype = type_new_array((*ptype)->name,
type_array_get_element
_type
(*ptype),
type_array_get_element(*ptype),
type_array_is_decl_as_ptr(*ptype),
type_array_get_dim(*ptype),
type_array_get_conformance(*ptype),
...
...
@@ -1802,8 +1802,8 @@ static declarator_t *make_declarator(var_t *var)
static type_t *make_safearray(type_t *type)
{
return type_new_array(NULL, type_new_alias(type, "SAFEARRAY"), TRUE, 0,
NULL, NULL, FC_RP);
const decl_spec_t ds = {.type = type_new_alias(type, "SAFEARRAY")};
return type_new_array(NULL, &ds, TRUE, 0,
NULL, NULL, FC_RP);
}
static typelib_t *make_library(const char *name, const attr_list_t *attrs)
...
...
tools/widl/typetree.c
View file @
d4dfbb63
...
...
@@ -217,7 +217,7 @@ type_t *type_new_coclass(char *name)
}
type_t
*
type_new_array
(
const
char
*
name
,
type
_t
*
element
,
int
declptr
,
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
,
unsigned
char
ptr_default_fc
)
{
...
...
@@ -229,7 +229,8 @@ type_t *type_new_array(const char *name, type_t *element, int declptr,
t
->
details
.
array
.
size_is
=
size_is
;
else
t
->
details
.
array
.
dim
=
dim
;
t
->
details
.
array
.
elem
.
type
=
element
;
if
(
element
)
t
->
details
.
array
.
elem
=
*
element
;
t
->
details
.
array
.
ptr_def_fc
=
ptr_default_fc
;
return
t
;
}
...
...
tools/widl/typetree.h
View file @
d4dfbb63
...
...
@@ -33,7 +33,7 @@ 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_module
(
char
*
name
);
type_t
*
type_new_array
(
const
char
*
name
,
type
_t
*
element
,
int
declptr
,
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
,
unsigned
char
ptr_default_fc
);
type_t
*
type_new_basic
(
enum
type_basic_type
basic_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