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
732f67ed
Commit
732f67ed
authored
Aug 21, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Generate a name for the encapsulated union type.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
88207f0c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
parser.y
tools/widl/parser.y
+1
-2
typetree.c
tools/widl/typetree.c
+1
-1
typetree.h
tools/widl/typetree.h
+1
-0
No files found.
tools/widl/parser.y
View file @
732f67ed
...
...
@@ -82,7 +82,6 @@ static var_t *reg_const(var_t *var);
static void push_namespace(const char *name);
static void pop_namespace(const char *name);
static char *gen_name(void);
static void check_arg_attrs(const var_t *arg);
static void check_statements(const statement_list_t *stmts, int is_inside_library);
static void check_all_user_types(const statement_list_t *stmts);
...
...
@@ -2033,7 +2032,7 @@ var_t *find_const(const char *name, int f)
return cur->var;
}
static
char *gen_name(void)
char *gen_name(void)
{
static const char format[] = "__WIDL_%s_generated_name_%08lX";
static unsigned long n = 0;
...
...
tools/widl/typetree.c
View file @
732f67ed
...
...
@@ -366,7 +366,7 @@ type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *unio
{
if
(
!
union_field
)
union_field
=
make_var
(
xstrdup
(
"tagged_union"
));
union_field
->
declspec
.
type
=
type_new_nonencapsulated_union
(
NULL
,
TRUE
,
cases
);
union_field
->
declspec
.
type
=
type_new_nonencapsulated_union
(
gen_name
()
,
TRUE
,
cases
);
t
->
details
.
structure
=
xmalloc
(
sizeof
(
*
t
->
details
.
structure
));
t
->
details
.
structure
->
fields
=
append_var
(
NULL
,
switch_field
);
...
...
tools/widl/typetree.h
View file @
732f67ed
...
...
@@ -51,6 +51,7 @@ void type_module_define(type_t *module, statement_list_t *stmts);
type_t
*
type_coclass_define
(
type_t
*
coclass
,
ifref_list_t
*
ifaces
);
int
type_is_equal
(
const
type_t
*
type1
,
const
type_t
*
type2
);
const
char
*
type_get_name
(
const
type_t
*
type
,
enum
name_type
name_type
);
char
*
gen_name
(
void
);
/* FIXME: shouldn't need to export this */
type_t
*
duptype
(
type_t
*
t
,
int
dupname
);
...
...
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