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
b48489be
Commit
b48489be
authored
Sep 17, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added String.length implementation.
parent
c1372814
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
string.c
dlls/jscript/string.c
+15
-1
api.js
dlls/jscript/tests/api.js
+5
-0
No files found.
dlls/jscript/string.c
View file @
b48489be
...
...
@@ -70,8 +70,22 @@ static const WCHAR isPrototypeOfW[] = {'i','s','P','r','o','t','o','t','y','p','
static
HRESULT
String_length
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
FIXME
(
"
\n
"
);
TRACE
(
"%p
\n
"
,
dispex
);
switch
(
flags
)
{
case
DISPATCH_PROPERTYGET
:
{
StringInstance
*
jsthis
=
(
StringInstance
*
)
dispex
;
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
jsthis
->
length
;
break
;
}
default:
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
return
E_NOTIMPL
;
}
return
S_OK
;
}
static
HRESULT
String_toString
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
...
...
dlls/jscript/tests/api.js
View file @
b48489be
...
...
@@ -16,6 +16,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
ok
(
""
.
length
===
0
,
"
\"\"
.length = "
+
""
.
length
);
ok
(
getVT
(
""
.
length
)
==
"VT_I4"
,
"
\"\"
.length = "
+
""
.
length
);
ok
(
"abc"
.
length
===
3
,
"
\"
abc
\"
.length = "
+
"abc"
.
length
);
ok
(
String
.
prototype
.
length
===
0
,
"String.prototype.length = "
+
String
.
prototype
.
length
);
var
arr
=
new
Array
();
ok
(
typeof
(
arr
)
===
"object"
,
"arr () is not object"
);
ok
((
arr
.
length
===
0
),
"arr.length is not 0"
);
...
...
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