Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
3fa78601
Commit
3fa78601
authored
12 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
vbscript: Added Len implementation.
parent
20b2d057
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/vbscript/global.c
+22
-2
22 additions, 2 deletions
dlls/vbscript/global.c
dlls/vbscript/tests/api.vbs
+6
-0
6 additions, 0 deletions
dlls/vbscript/tests/api.vbs
with
28 additions
and
2 deletions
dlls/vbscript/global.c
+
22
−
2
View file @
3fa78601
...
...
@@ -468,8 +468,28 @@ static HRESULT Global_RGB(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA
static
HRESULT
Global_Len
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
DWORD
len
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_variant
(
arg
));
if
(
V_VT
(
arg
)
==
VT_NULL
)
return
return_null
(
res
);
if
(
V_VT
(
arg
)
!=
VT_BSTR
)
{
BSTR
str
;
hres
=
to_string
(
arg
,
&
str
);
if
(
FAILED
(
hres
))
return
hres
;
len
=
SysStringLen
(
str
);
SysFreeString
(
str
);
}
else
{
len
=
SysStringLen
(
V_BSTR
(
arg
));
}
return
return_int
(
res
,
len
);
}
static
HRESULT
Global_LenB
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
This diff is collapsed.
Click to expand it.
dlls/vbscript/tests/api.vbs
+
6
−
0
View file @
3fa78601
...
...
@@ -173,4 +173,10 @@ TestLCase 0.123, doubleAsString(0.123)
TestLCase
Empty
,
""
Call
ok
(
getVT
(
LCase
(
Null
))
=
"VT_NULL"
,
"getVT(LCase(Null)) = "
&
getVT
(
LCase
(
Null
)))
Call
ok
(
Len
(
"abc"
)
=
3
,
"Len(abc) = "
&
Len
(
"abc"
))
Call
ok
(
Len
(
""
)
=
0
,
"Len() = "
&
Len
(
""
))
Call
ok
(
Len
(
1
)
=
1
,
"Len(1) = "
&
Len
(
1
))
Call
ok
(
isNull
(
Len
(
null
)),
"Len(null) = "
&
Len
(
null
))
Call
ok
(
Len
(
empty
)
=
0
,
"Len(empty) = "
&
Len
(
empty
))
Call
reportSuccess
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment