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
f2e7626c
Commit
f2e7626c
authored
Sep 15, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added ArrayInstance::on_put implementation.
parent
06d19171
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
array.c
dlls/jscript/array.c
+17
-1
api.js
dlls/jscript/tests/api.js
+3
-0
No files found.
dlls/jscript/array.c
View file @
f2e7626c
...
...
@@ -194,7 +194,23 @@ static void Array_destructor(DispatchEx *dispex)
static
void
Array_on_put
(
DispatchEx
*
dispex
,
const
WCHAR
*
name
)
{
FIXME
(
"
\n
"
);
ArrayInstance
*
array
=
(
ArrayInstance
*
)
dispex
;
const
WCHAR
*
ptr
=
name
;
DWORD
id
=
0
;
if
(
!
isdigitW
(
*
ptr
))
return
;
while
(
*
ptr
&&
isdigitW
(
*
ptr
))
{
id
=
id
*
10
+
(
*
ptr
-
'0'
);
ptr
++
;
}
if
(
*
ptr
)
return
;
if
(
id
>=
array
->
length
)
array
->
length
=
id
+
1
;
}
static
const
builtin_prop_t
Array_props
[]
=
{
...
...
dlls/jscript/tests/api.js
View file @
f2e7626c
...
...
@@ -28,6 +28,9 @@ ok(arr["0"] === 1, "arr[0] is not 1");
ok
(
arr
[
"1"
]
===
2
,
"arr[1] is not 2"
);
ok
(
arr
[
"2"
]
===
"test"
,
"arr[2] is not
\"
test
\"
"
);
arr
[
"7"
]
=
true
;
ok
((
arr
.
length
===
8
),
"arr.length is not 8"
);
var
arr
=
new
Array
(
6
);
ok
(
typeof
(
arr
)
===
"object"
,
"arr (6) is not object"
);
ok
((
arr
.
length
===
6
),
"arr.length is not 6"
);
...
...
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