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
7771a9ae
Commit
7771a9ae
authored
Mar 24, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Simplify attribute creation with either int or ptr value.
parent
f36fbb37
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
14 deletions
+5
-14
attribute.c
tools/widl/attribute.c
+2
-10
parser.y
tools/widl/parser.y
+0
-0
typetree.c
tools/widl/typetree.c
+1
-1
widl.h
tools/widl/widl.h
+2
-3
No files found.
tools/widl/attribute.c
View file @
7771a9ae
...
...
@@ -24,15 +24,7 @@
#include "parser.tab.h"
attr_t
*
make_attr
(
enum
attr_type
attr_type
)
{
attr_t
*
a
=
xmalloc
(
sizeof
(
attr_t
)
);
a
->
type
=
attr_type
;
a
->
u
.
ival
=
0
;
return
a
;
}
attr_t
*
make_attrv
(
enum
attr_type
attr_type
,
unsigned
int
val
)
attr_t
*
attr_int
(
enum
attr_type
attr_type
,
unsigned
int
val
)
{
attr_t
*
a
=
xmalloc
(
sizeof
(
attr_t
)
);
a
->
type
=
attr_type
;
...
...
@@ -40,7 +32,7 @@ attr_t *make_attrv( enum attr_type attr_type, unsigned int val )
return
a
;
}
attr_t
*
make_attrp
(
enum
attr_type
attr_type
,
void
*
val
)
attr_t
*
attr_ptr
(
enum
attr_type
attr_type
,
void
*
val
)
{
attr_t
*
a
=
xmalloc
(
sizeof
(
attr_t
)
);
a
->
type
=
attr_type
;
...
...
tools/widl/parser.y
View file @
7771a9ae
This diff is collapsed.
Click to expand it.
tools/widl/typetree.c
View file @
7771a9ae
...
...
@@ -1268,7 +1268,7 @@ static void compute_interface_signature_uuid(type_t *iface)
if
(
!
(
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
)))
{
uuid
=
xmalloc
(
sizeof
(
*
uuid
));
iface
->
attrs
=
append_attr
(
iface
->
attrs
,
make_attrp
(
ATTR_UUID
,
uuid
)
);
iface
->
attrs
=
append_attr
(
iface
->
attrs
,
attr_ptr
(
ATTR_UUID
,
uuid
)
);
}
sha1_init
(
&
ctx
);
...
...
tools/widl/widl.h
View file @
7771a9ae
...
...
@@ -97,9 +97,8 @@ extern void end_cplusplus_guard(FILE *fp);
/* attribute.c */
extern
attr_t
*
make_attr
(
enum
attr_type
attr_type
);
extern
attr_t
*
make_attrv
(
enum
attr_type
attr_type
,
unsigned
int
val
);
extern
attr_t
*
make_attrp
(
enum
attr_type
attr_type
,
void
*
val
);
extern
attr_t
*
attr_int
(
enum
attr_type
attr_type
,
unsigned
int
val
);
extern
attr_t
*
attr_ptr
(
enum
attr_type
attr_type
,
void
*
val
);
extern
attr_t
*
make_custom_attr
(
struct
uuid
*
id
,
expr_t
*
pval
);
extern
int
is_attr
(
const
attr_list_t
*
list
,
enum
attr_type
attr_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