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
f192f2f1
Commit
f192f2f1
authored
Apr 11, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Support type conversion to VT_UI2.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
02da0edd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
jsutils.c
dlls/jscript/jsutils.c
+8
-0
caller.c
dlls/jscript/tests/caller.c
+3
-0
No files found.
dlls/jscript/jsutils.c
View file @
f192f2f1
...
...
@@ -894,6 +894,14 @@ HRESULT variant_change_type(script_ctx_t *ctx, VARIANT *dst, VARIANT *src, VARTY
}
break
;
}
case
VT_UI2
:
{
UINT32
i
;
hres
=
to_uint32
(
ctx
,
val
,
&
i
);
if
(
SUCCEEDED
(
hres
))
V_UI2
(
dst
)
=
i
;
break
;
}
case
VT_R8
:
{
double
n
;
hres
=
to_number
(
ctx
,
val
,
&
n
);
...
...
dlls/jscript/tests/caller.c
View file @
f192f2f1
...
...
@@ -136,6 +136,9 @@ static void test_change_type(IVariantChangeType *change_type, VARIANT *src, cons
call_change_type
(
change_type
,
&
v
,
src
,
VT_I4
);
ok
(
V_I4
(
&
v
)
==
ex
->
int_result
,
"V_I4(v) = %d, expected %d
\n
"
,
V_I4
(
&
v
),
ex
->
int_result
);
call_change_type
(
change_type
,
&
v
,
src
,
VT_UI2
);
ok
(
V_UI2
(
&
v
)
==
(
UINT16
)
ex
->
int_result
,
"V_UI2(v) = %u, expected %u
\n
"
,
V_UI2
(
&
v
),
(
UINT16
)
ex
->
int_result
);
call_change_type
(
change_type
,
&
v
,
src
,
VT_BSTR
);
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
ex
->
str_result
),
"V_BSTR(v) = %s, expected %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)),
ex
->
str_result
);
VariantClear
(
&
v
);
...
...
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