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
b0632af9
Commit
b0632af9
authored
Feb 03, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added support for VT_UI4 variants.
parent
8d764d5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
jsutils.c
dlls/jscript/jsutils.c
+3
-0
run.c
dlls/jscript/tests/run.c
+6
-2
No files found.
dlls/jscript/jsutils.c
View file @
b0632af9
...
@@ -288,6 +288,9 @@ HRESULT variant_to_jsval(VARIANT *var, jsval_t *r)
...
@@ -288,6 +288,9 @@ HRESULT variant_to_jsval(VARIANT *var, jsval_t *r)
case
VT_INT
:
case
VT_INT
:
*
r
=
jsval_number
(
V_INT
(
var
));
*
r
=
jsval_number
(
V_INT
(
var
));
return
S_OK
;
return
S_OK
;
case
VT_UI4
:
*
r
=
jsval_number
(
V_UI4
(
var
));
return
S_OK
;
case
VT_UNKNOWN
:
case
VT_UNKNOWN
:
if
(
V_UNKNOWN
(
var
))
{
if
(
V_UNKNOWN
(
var
))
{
IDispatch
*
disp
;
IDispatch
*
disp
;
...
...
dlls/jscript/tests/run.c
View file @
b0632af9
...
@@ -1211,7 +1211,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
...
@@ -1211,7 +1211,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
return
S_OK
;
return
S_OK
;
case
DISPID_GLOBAL_TESTARGTYPES
:
{
case
DISPID_GLOBAL_TESTARGTYPES
:
{
VARIANT
args
[
4
];
VARIANT
args
[
5
];
DISPPARAMS
dp
=
{
args
,
NULL
,
sizeof
(
args
)
/
sizeof
(
*
args
),
0
};
DISPPARAMS
dp
=
{
args
,
NULL
,
sizeof
(
args
)
/
sizeof
(
*
args
),
0
};
HRESULT
hres
;
HRESULT
hres
;
...
@@ -1247,6 +1247,8 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
...
@@ -1247,6 +1247,8 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
V_UNKNOWN
(
args
+
2
)
=
(
IUnknown
*
)
&
testObj
;
V_UNKNOWN
(
args
+
2
)
=
(
IUnknown
*
)
&
testObj
;
V_VT
(
args
+
3
)
=
VT_UNKNOWN
;
V_VT
(
args
+
3
)
=
VT_UNKNOWN
;
V_UNKNOWN
(
args
+
3
)
=
NULL
;
V_UNKNOWN
(
args
+
3
)
=
NULL
;
V_VT
(
args
+
4
)
=
VT_UI4
;
V_UI4
(
args
+
4
)
=
0xffffffff
;
hres
=
IDispatch_Invoke
(
V_DISPATCH
(
pdp
->
rgvarg
),
DISPID_VALUE
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dp
,
NULL
,
NULL
,
NULL
);
hres
=
IDispatch_Invoke
(
V_DISPATCH
(
pdp
->
rgvarg
),
DISPID_VALUE
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dp
,
NULL
,
NULL
,
NULL
);
ok
(
hres
==
S_OK
,
"Invoke failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Invoke failed: %08x
\n
"
,
hres
);
...
@@ -2410,12 +2412,14 @@ static BOOL run_tests(void)
...
@@ -2410,12 +2412,14 @@ static BOOL run_tests(void)
CHECK_CALLED
(
global_propargput_i
);
CHECK_CALLED
(
global_propargput_i
);
SET_EXPECT
(
global_testargtypes_i
);
SET_EXPECT
(
global_testargtypes_i
);
parse_script_a
(
"testArgTypes(dispUnk, intProp(), intProp, getShort(), shortProp, function(nullunk,d,i,s) {"
parse_script_a
(
"testArgTypes(dispUnk, intProp(), intProp, getShort(), shortProp, function(
ui4,
nullunk,d,i,s) {"
" ok(getVT(i) === 'VT_I4', 'getVT(i) = ' + getVT(i));"
" ok(getVT(i) === 'VT_I4', 'getVT(i) = ' + getVT(i));"
" ok(getVT(s) === 'VT_I4', 'getVT(s) = ' + getVT(s));"
" ok(getVT(s) === 'VT_I4', 'getVT(s) = ' + getVT(s));"
" ok(getVT(d) === 'VT_DISPATCH', 'getVT(d) = ' + getVT(d));"
" ok(getVT(d) === 'VT_DISPATCH', 'getVT(d) = ' + getVT(d));"
" ok(getVT(nullunk) === 'VT_DISPATCH', 'getVT(nullunk) = ' + getVT(nullunk));"
" ok(getVT(nullunk) === 'VT_DISPATCH', 'getVT(nullunk) = ' + getVT(nullunk));"
" ok(nullunk === null, 'nullunk !== null');"
" ok(nullunk === null, 'nullunk !== null');"
" ok(getVT(ui4) === 'VT_R8', 'getVT(s) = ' + getVT(s));"
" ok(ui4 > 0, 'ui4 = ' + ui4);"
"});"
);
"});"
);
CHECK_CALLED
(
global_testargtypes_i
);
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