Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
aad0340c
Commit
aad0340c
authored
Nov 01, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Add support for parameterized set statements.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ea139838
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
10 deletions
+36
-10
interp.c
dlls/vbscript/interp.c
+5
-10
run.c
dlls/vbscript/tests/run.c
+31
-0
No files found.
dlls/vbscript/interp.c
View file @
aad0340c
...
...
@@ -872,23 +872,18 @@ static HRESULT interp_set_ident(exec_ctx_t *ctx)
DISPPARAMS
dp
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
arg
));
if
(
arg_cnt
)
{
FIXME
(
"arguments not supported
\n
"
);
return
E_NOTIMPL
;
}
TRACE
(
"%s %u
\n
"
,
debugstr_w
(
arg
),
arg_cnt
);
hres
=
stack_assume_disp
(
ctx
,
0
,
NULL
);
hres
=
stack_assume_disp
(
ctx
,
arg_cnt
,
NULL
);
if
(
FAILED
(
hres
))
return
hres
;
vbstack_to_dp
(
ctx
,
0
,
TRUE
,
&
dp
);
hres
=
assign_ident
(
ctx
,
ctx
->
instr
->
arg1
.
bstr
,
DISPATCH_PROPERTYPUTREF
,
&
dp
);
vbstack_to_dp
(
ctx
,
arg_cnt
,
TRUE
,
&
dp
);
hres
=
assign_ident
(
ctx
,
arg
,
DISPATCH_PROPERTYPUTREF
,
&
dp
);
if
(
FAILED
(
hres
))
return
hres
;
stack_popn
(
ctx
,
1
);
stack_popn
(
ctx
,
arg_cnt
+
1
);
return
S_OK
;
}
...
...
dlls/vbscript/tests/run.c
View file @
aad0340c
...
...
@@ -104,6 +104,8 @@ DEFINE_EXPECT(global_propargput_d);
DEFINE_EXPECT
(
global_propargput_i
);
DEFINE_EXPECT
(
global_propargput1_d
);
DEFINE_EXPECT
(
global_propargput1_i
);
DEFINE_EXPECT
(
global_propargset_d
);
DEFINE_EXPECT
(
global_propargset_i
);
DEFINE_EXPECT
(
global_testoptionalarg_i
);
DEFINE_EXPECT
(
global_testerrorobject_i
);
DEFINE_EXPECT
(
collectionobj_newenum_i
);
...
...
@@ -140,6 +142,7 @@ DEFINE_EXPECT(OnLeaveScript);
#define DISPID_GLOBAL_GLOBALCALLBACK 1022
#define DISPID_GLOBAL_TESTERROROBJECT 1023
#define DISPID_GLOBAL_THROWWITHDESC 1024
#define DISPID_GLOBAL_PROPARGSET 1025
#define DISPID_TESTOBJ_PROPGET 2000
#define DISPID_TESTOBJ_PROPPUT 2001
...
...
@@ -1101,6 +1104,7 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
{
L"RefObj"
,
DISPID_GLOBAL_REFOBJ
},
{
L"propargput"
,
DISPID_GLOBAL_PROPARGPUT
,
REF_EXPECT
(
global_propargput_d
)
},
{
L"propargput1"
,
DISPID_GLOBAL_PROPARGPUT1
,
REF_EXPECT
(
global_propargput1_d
)
},
{
L"propargset"
,
DISPID_GLOBAL_PROPARGSET
,
REF_EXPECT
(
global_propargset_d
)
},
{
L"counter"
,
DISPID_GLOBAL_COUNTER
},
{
L"doubleAsString"
,
DISPID_GLOBAL_DOUBLEASSTRING
},
{
L"testArray"
,
DISPID_GLOBAL_TESTARRAY
},
...
...
@@ -1389,6 +1393,27 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
return
S_OK
;
case
DISPID_GLOBAL_PROPARGSET
:
CHECK_EXPECT
(
global_propargset_i
);
ok
(
wFlags
==
DISPATCH_PROPERTYPUTREF
,
"wFlags = %x
\n
"
,
wFlags
);
ok
(
pdp
!=
NULL
,
"pdp == NULL
\n
"
);
ok
(
pdp
->
rgvarg
!=
NULL
,
"rgvarg == NULL
\n
"
);
ok
(
pdp
->
rgdispidNamedArgs
!=
NULL
,
"rgdispidNamedArgs == NULL
\n
"
);
ok
(
pdp
->
cArgs
==
2
,
"cArgs = %d
\n
"
,
pdp
->
cArgs
);
ok
(
pdp
->
cNamedArgs
==
1
,
"cNamedArgs = %d
\n
"
,
pdp
->
cNamedArgs
);
ok
(
pdp
->
rgdispidNamedArgs
[
0
]
==
DISPID_PROPERTYPUT
,
"pdp->rgdispidNamedArgs[0] = %d
\n
"
,
pdp
->
rgdispidNamedArgs
[
0
]);
ok
(
!
pvarRes
,
"pvarRes != NULL
\n
"
);
ok
(
pei
!=
NULL
,
"pei == NULL
\n
"
);
ok
(
V_VT
(
pdp
->
rgvarg
)
==
VT_DISPATCH
,
"V_VT(psp->rgvargs) = %d
\n
"
,
V_VT
(
pdp
->
rgvarg
));
ok
(
V_DISPATCH
(
pdp
->
rgvarg
)
==
(
IDispatch
*
)
&
testObj
,
"V_DISPATCH(psp->rgvargs) = %p
\n
"
,
V_DISPATCH
(
pdp
->
rgvarg
));
ok
(
V_VT
(
pdp
->
rgvarg
+
1
)
==
VT_I2
,
"V_VT(psp->rgvargs+1) = %d
\n
"
,
V_VT
(
pdp
->
rgvarg
+
1
));
ok
(
V_I2
(
pdp
->
rgvarg
+
1
)
==
0
,
"V_I2(psp->rgvargs+1) = %d
\n
"
,
V_I2
(
pdp
->
rgvarg
+
1
));
return
S_OK
;
case
DISPID_GLOBAL_COUNTER
:
ok
(
pdp
!=
NULL
,
"pdp == NULL
\n
"
);
todo_wine
ok
(
pdp
->
rgvarg
!=
NULL
,
"rgvarg == NULL
\n
"
);
...
...
@@ -2835,6 +2860,12 @@ static void run_tests(void)
CHECK_CALLED
(
global_propargput1_d
);
CHECK_CALLED
(
global_propargput1_i
);
SET_EXPECT
(
global_propargset_d
);
SET_EXPECT
(
global_propargset_i
);
parse_script_a
(
"set propargset (counter()) = testObj"
);
CHECK_CALLED
(
global_propargset_d
);
CHECK_CALLED
(
global_propargset_i
);
SET_EXPECT
(
testobj_propget_d
);
SET_EXPECT
(
testobj_propget_i
);
parse_script_a
(
"dim x
\n
with testObj
\n
x=1+.propget
\n
end with"
);
...
...
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