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
c0d20295
Commit
c0d20295
authored
Sep 21, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed conversion in place in IVariantChangeType::ChangeType.
parent
5c02bc11
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
jscript.c
dlls/jscript/jscript.c
+11
-3
caller.c
dlls/jscript/tests/caller.c
+10
-0
No files found.
dlls/jscript/jscript.c
View file @
c0d20295
...
...
@@ -1007,20 +1007,28 @@ static ULONG WINAPI VariantChangeType_Release(IVariantChangeType *iface)
static
HRESULT
WINAPI
VariantChangeType_ChangeType
(
IVariantChangeType
*
iface
,
VARIANT
*
dst
,
VARIANT
*
src
,
LCID
lcid
,
VARTYPE
vt
)
{
JScript
*
This
=
impl_from_IVariantChangeType
(
iface
);
VARIANT
res
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p %
s %x %d)
\n
"
,
This
,
dst
,
debugstr_variant
(
src
),
lcid
,
vt
);
TRACE
(
"(%p)->(%p %
p%s %x %d)
\n
"
,
This
,
dst
,
src
,
debugstr_variant
(
src
),
lcid
,
vt
);
if
(
!
This
->
ctx
)
{
FIXME
(
"Object uninitialized
\n
"
);
return
E_UNEXPECTED
;
}
hres
=
VariantClear
(
ds
t
);
hres
=
variant_change_type
(
This
->
ctx
,
&
res
,
src
,
v
t
);
if
(
FAILED
(
hres
))
return
hres
;
return
variant_change_type
(
This
->
ctx
,
dst
,
src
,
vt
);
hres
=
VariantClear
(
dst
);
if
(
FAILED
(
hres
))
{
VariantClear
(
&
res
);
return
hres
;
}
*
dst
=
res
;
return
S_OK
;
}
static
const
IVariantChangeTypeVtbl
VariantChangeTypeVtbl
=
{
...
...
dlls/jscript/tests/caller.c
View file @
c0d20295
...
...
@@ -168,6 +168,7 @@ static void test_change_type(IVariantChangeType *change_type, VARIANT *src, cons
static
void
test_change_types
(
IVariantChangeType
*
change_type
,
IDispatch
*
obj_disp
)
{
VARIANT
v
,
dst
;
BSTR
str
;
HRESULT
hres
;
static
const
conv_results_t
bool_results
[]
=
{
...
...
@@ -214,6 +215,15 @@ static void test_change_types(IVariantChangeType *change_type, IDispatch *obj_di
hres
=
IVariantChangeType_ChangeType
(
change_type
,
&
dst
,
&
v
,
0
,
VT_I4
);
ok
(
hres
==
DISP_E_BADVARTYPE
,
"ChangeType failed: %08x, expected DISP_E_BADVARTYPE
\n
"
,
hres
);
ok
(
V_VT
(
&
dst
)
==
0xdead
,
"V_VT(dst) = %d
\n
"
,
V_VT
(
&
dst
));
/* Test conversion in place */
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
str
=
a2bstr
(
"test"
);
hres
=
IVariantChangeType_ChangeType
(
change_type
,
&
v
,
&
v
,
0
,
VT_BSTR
);
ok
(
hres
==
S_OK
,
"ChangeType failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_BSTR
(
&
v
)
!=
str
,
"V_BSTR(v) == str
\n
"
);
ok
(
!
strcmp_wa
(
V_BSTR
(
&
v
),
"test"
),
"V_BSTR(v) = %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
}
static
void
test_caller
(
IServiceProvider
*
caller
,
IDispatch
*
arg_obj
)
...
...
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