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
7c29a532
Commit
7c29a532
authored
Aug 10, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Added support for namespaced structs.
parent
8d43c54e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
header.c
tools/widl/header.c
+2
-2
parser.y
tools/widl/parser.y
+3
-3
typetree.c
tools/widl/typetree.c
+5
-3
typetree.h
tools/widl/typetree.h
+1
-1
No files found.
tools/widl/header.c
View file @
7c29a532
...
...
@@ -314,7 +314,7 @@ void write_type_left(FILE *h, type_t *t, enum name_type name_type, int declonly)
case
TYPE_STRUCT
:
case
TYPE_ENCAPSULATED_UNION
:
if
(
!
declonly
&&
t
->
defined
&&
!
t
->
written
)
{
if
(
t
->
name
)
fprintf
(
h
,
"struct %s {
\n
"
,
t
->
name
);
if
(
name
)
fprintf
(
h
,
"struct %s {
\n
"
,
name
);
else
fprintf
(
h
,
"struct {
\n
"
);
t
->
written
=
TRUE
;
indentation
++
;
...
...
@@ -325,7 +325,7 @@ void write_type_left(FILE *h, type_t *t, enum name_type name_type, int declonly)
indent
(
h
,
-
1
);
fprintf
(
h
,
"}"
);
}
else
fprintf
(
h
,
"struct %s"
,
t
->
name
?
t
->
name
:
""
);
else
fprintf
(
h
,
"struct %s"
,
name
?
name
:
""
);
break
;
case
TYPE_UNION
:
if
(
!
declonly
&&
t
->
defined
&&
!
t
->
written
)
{
...
...
tools/widl/parser.y
View file @
7c29a532
...
...
@@ -380,7 +380,7 @@ typedecl:
enumdef
| tENUM aIDENTIFIER { $$ = type_new_enum($2, current_namespace, FALSE, NULL); }
| structdef
| tSTRUCT aIDENTIFIER { $$ = type_new_struct($2, FALSE, NULL); }
| tSTRUCT aIDENTIFIER { $$ = type_new_struct($2,
current_namespace,
FALSE, NULL); }
| uniondef
| tUNION aIDENTIFIER { $$ = type_new_nonencapsulated_union($2, FALSE, NULL); }
| attributes enumdef { $$ = $2; $$->attrs = check_enum_attrs($1); }
...
...
@@ -1091,7 +1091,7 @@ pointer_type:
| tPTR { $$ = RPC_FC_FP; }
;
structdef: tSTRUCT t_ident '{' fields '}' { $$ = type_new_struct($2, TRUE, $4); }
structdef: tSTRUCT t_ident '{' fields '}' { $$ = type_new_struct($2,
current_namespace,
TRUE, $4); }
;
type: tVOID { $$ = type_new_void(); }
...
...
@@ -1100,7 +1100,7 @@ type: tVOID { $$ = type_new_void(); }
| enumdef { $$ = $1; }
| tENUM aIDENTIFIER { $$ = type_new_enum($2, current_namespace, FALSE, NULL); }
| structdef { $$ = $1; }
| tSTRUCT aIDENTIFIER { $$ = type_new_struct($2, FALSE, NULL); }
| tSTRUCT aIDENTIFIER { $$ = type_new_struct($2,
current_namespace,
FALSE, NULL); }
| uniondef { $$ = $1; }
| tUNION aIDENTIFIER { $$ = type_new_nonencapsulated_union($2, FALSE, NULL); }
| tSAFEARRAY '(' type ')' { $$ = make_safearray($3); }
...
...
tools/widl/typetree.c
View file @
7c29a532
...
...
@@ -297,11 +297,13 @@ type_t *type_new_enum(const char *name, struct namespace *namespace, int defined
return
t
;
}
type_t
*
type_new_struct
(
char
*
name
,
int
defined
,
var_list_t
*
fields
)
type_t
*
type_new_struct
(
char
*
name
,
struct
namespace
*
namespace
,
int
defined
,
var_list_t
*
fields
)
{
type_t
*
tag_type
=
name
?
find_type
(
name
,
NULL
,
tsSTRUCT
)
:
NULL
;
type_t
*
tag_type
=
name
?
find_type
(
name
,
namespace
,
tsSTRUCT
)
:
NULL
;
type_t
*
t
=
make_type
(
TYPE_STRUCT
);
t
->
name
=
name
;
t
->
namespace
=
namespace
;
if
(
tag_type
&&
tag_type
->
details
.
structure
)
t
->
details
.
structure
=
tag_type
->
details
.
structure
;
else
if
(
defined
)
...
...
@@ -313,7 +315,7 @@ type_t *type_new_struct(char *name, int defined, var_list_t *fields)
if
(
name
)
{
if
(
defined
)
reg_type
(
t
,
name
,
NULL
,
tsSTRUCT
);
reg_type
(
t
,
name
,
namespace
,
tsSTRUCT
);
else
add_incomplete
(
t
);
}
...
...
tools/widl/typetree.h
View file @
7c29a532
...
...
@@ -41,7 +41,7 @@ type_t *type_new_int(enum type_basic_type basic_type, int sign);
type_t
*
type_new_void
(
void
);
type_t
*
type_new_coclass
(
char
*
name
);
type_t
*
type_new_enum
(
const
char
*
name
,
struct
namespace
*
namespace
,
int
defined
,
var_list_t
*
enums
);
type_t
*
type_new_struct
(
char
*
name
,
int
defined
,
var_list_t
*
fields
);
type_t
*
type_new_struct
(
char
*
name
,
struct
namespace
*
namespace
,
int
defined
,
var_list_t
*
fields
);
type_t
*
type_new_nonencapsulated_union
(
const
char
*
name
,
int
defined
,
var_list_t
*
fields
);
type_t
*
type_new_encapsulated_union
(
char
*
name
,
var_t
*
switch_field
,
var_t
*
union_field
,
var_list_t
*
cases
);
type_t
*
type_new_bitfield
(
type_t
*
field_type
,
const
expr_t
*
bits
);
...
...
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