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
58dd9c2b
Commit
58dd9c2b
authored
Aug 08, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Support VT_UI1 and VT_I1 types.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c168fd06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
jsutils.c
dlls/jscript/jsutils.c
+6
-0
run.c
dlls/jscript/tests/run.c
+11
-3
No files found.
dlls/jscript/jsutils.c
View file @
58dd9c2b
...
...
@@ -292,6 +292,12 @@ HRESULT variant_to_jsval(VARIANT *var, jsval_t *r)
*
r
=
jsval_disp
(
V_DISPATCH
(
var
));
return
S_OK
;
}
case
VT_I1
:
*
r
=
jsval_number
(
V_I1
(
var
));
return
S_OK
;
case
VT_UI1
:
*
r
=
jsval_number
(
V_UI1
(
var
));
return
S_OK
;
case
VT_I2
:
*
r
=
jsval_number
(
V_I2
(
var
));
return
S_OK
;
...
...
dlls/jscript/tests/run.c
View file @
58dd9c2b
...
...
@@ -1448,7 +1448,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
return
S_OK
;
case
DISPID_GLOBAL_TESTARGTYPES
:
{
VARIANT
args
[
8
],
v
;
VARIANT
args
[
10
],
v
;
DISPPARAMS
dp
=
{
args
,
NULL
,
ARRAY_SIZE
(
args
),
0
};
HRESULT
hres
;
...
...
@@ -1491,7 +1491,11 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
V_VT
(
args
+
6
)
=
VT_R4
;
V_R4
(
args
+
6
)
=
0
.
5
;
V_VT
(
args
+
7
)
=
VT_UI2
;
V_R4
(
args
+
7
)
=
3
;
V_UI2
(
args
+
7
)
=
3
;
V_VT
(
args
+
8
)
=
VT_UI1
;
V_UI1
(
args
+
8
)
=
4
;
V_VT
(
args
+
9
)
=
VT_I1
;
V_I1
(
args
+
9
)
=
5
;
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
2
;
hres
=
IDispatch_Invoke
(
V_DISPATCH
(
pdp
->
rgvarg
),
DISPID_VALUE
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dp
,
NULL
,
NULL
,
NULL
);
...
...
@@ -2924,7 +2928,7 @@ static BOOL run_tests(void)
SET_EXPECT
(
global_testargtypes_i
);
parse_script_a
(
"testArgTypes(dispUnk, intProp(), intProp, getShort(), shortProp,"
"function(ui2,r4,i4ref,ui4,nullunk,d,i,s) {"
"function(
i1,ui1,
ui2,r4,i4ref,ui4,nullunk,d,i,s) {"
" ok(getVT(i) === 'VT_I4', 'getVT(i) = ' + getVT(i));"
" ok(getVT(s) === 'VT_I4', 'getVT(s) = ' + getVT(s));"
" ok(getVT(d) === 'VT_DISPATCH', 'getVT(d) = ' + getVT(d));"
...
...
@@ -2937,6 +2941,10 @@ static BOOL run_tests(void)
" ok(r4 === 0.5, 'r4 = ' + r4);"
" ok(getVT(r4) === 'VT_R8', 'getVT(r4) = ' + getVT(r4));"
" ok(getVT(ui2) === 'VT_I4', 'getVT(ui2) = ' + getVT(ui2));"
" ok(getVT(ui1) === 'VT_I4', 'getVT(ui1) = ' + getVT(ui1));"
" ok(ui1 === 4, 'ui1 = ' + ui1);"
" ok(getVT(i1) === 'VT_I4', 'getVT(i1) = ' + getVT(i1));"
" ok(i1 === 5, 'i1 = ' + i1);"
"});"
);
CHECK_CALLED
(
global_testargtypes_i
);
...
...
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