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
66d3dd4b
Commit
66d3dd4b
authored
Sep 12, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added interpreter support for numeric literals.
parent
880d7066
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
interp.c
dlls/vbscript/interp.c
+24
-6
lang.vbs
dlls/vbscript/tests/lang.vbs
+6
-0
No files found.
dlls/vbscript/interp.c
View file @
66d3dd4b
...
...
@@ -253,20 +253,38 @@ static HRESULT interp_string(exec_ctx_t *ctx)
static
HRESULT
interp_long
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
const
LONG
arg
=
ctx
->
instr
->
arg1
.
lng
;
VARIANT
v
;
TRACE
(
"%d
\n
"
,
arg
);
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
arg
;
return
stack_push
(
ctx
,
&
v
);
}
static
HRESULT
interp_short
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
const
LONG
arg
=
ctx
->
instr
->
arg1
.
lng
;
VARIANT
v
;
TRACE
(
"%d
\n
"
,
arg
);
V_VT
(
&
v
)
=
VT_I2
;
V_I2
(
&
v
)
=
arg
;
return
stack_push
(
ctx
,
&
v
);
}
static
HRESULT
interp_double
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
const
DOUBLE
*
arg
=
ctx
->
instr
->
arg1
.
dbl
;
VARIANT
v
;
TRACE
(
"%lf
\n
"
,
*
arg
);
V_VT
(
&
v
)
=
VT_R8
;
V_R8
(
&
v
)
=
*
arg
;
return
stack_push
(
ctx
,
&
v
);
}
static
HRESULT
interp_empty
(
exec_ctx_t
*
ctx
)
...
...
dlls/vbscript/tests/lang.vbs
View file @
66d3dd4b
...
...
@@ -38,5 +38,11 @@ Call ok(getVT("") = "VT_BSTR", "getVT("""") is not VT_BSTR")
Call
ok
(
getVT
(
"test"
)
=
"VT_BSTR"
,
"getVT(
""
test
""
) is not VT_BSTR"
)
Call
ok
(
getVT
(
Empty
)
=
"VT_EMPTY"
,
"getVT(Empty) is not VT_EMPTY"
)
Call
ok
(
getVT
(
null
)
=
"VT_NULL"
,
"getVT(null) is not VT_NULL"
)
Call
ok
(
getVT
(
0
)
=
"VT_I2"
,
"getVT(0) is not VT_I2"
)
Call
ok
(
getVT
(
1
)
=
"VT_I2"
,
"getVT(1) is not VT_I2"
)
Call
ok
(
getVT
(
0.5
)
=
"VT_R8"
,
"getVT(0.5) is not VT_R8"
)
Call
ok
(
getVT
(
0.0
)
=
"VT_R8"
,
"getVT(0.0) is not VT_R8"
)
Call
ok
(
getVT
(
2147483647
)
=
"VT_I4"
,
"getVT(2147483647) is not VT_I4"
)
Call
ok
(
getVT
(
2147483648
)
=
"VT_R8"
,
"getVT(2147483648) is not VT_R8"
)
reportSuccess
()
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