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
ec989258
Commit
ec989258
authored
Sep 08, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Write default values for VARIANT arguments.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
737da3eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
write_msft.c
tools/widl/write_msft.c
+16
-1
No files found.
tools/widl/write_msft.c
View file @
ec989258
...
...
@@ -1221,7 +1221,8 @@ static void write_default_value(msft_typelib_t *typelib, type_t *type, expr_t *e
int
vt
;
if
(
expr
->
type
==
EXPR_STRLIT
||
expr
->
type
==
EXPR_WSTRLIT
)
{
if
(
get_type_vt
(
type
)
!=
VT_BSTR
)
vt
=
get_type_vt
(
type
);
if
(
vt
!=
VT_BSTR
&&
vt
!=
VT_VARIANT
)
error
(
"string default value applied to non-string type
\n
"
);
chat
(
"default value '%s'
\n
"
,
expr
->
u
.
sval
);
write_string_value
(
typelib
,
out
,
expr
->
u
.
sval
);
...
...
@@ -1251,6 +1252,20 @@ static void write_default_value(msft_typelib_t *typelib, type_t *type, expr_t *e
case
VT_UINT
:
case
VT_HRESULT
:
break
;
case
VT_VARIANT
:
{
switch
(
expr
->
type
)
{
case
EXPR_DOUBLE
:
vt
=
VT_R4
;
break
;
case
EXPR_NUM
:
vt
=
VT_I4
;
break
;
default:
warning
(
"can't write default VT_VARIANT value for expression type %d.
\n
"
,
expr
->
type
);
return
;
}
break
;
}
default:
warning
(
"can't write value of type %d yet
\n
"
,
vt
);
return
;
...
...
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